Title: File handle not closed properly when uploading from path. · Issue #52 · Imgur/imgurpython · GitHub
Open Graph Title: File handle not closed properly when uploading from path. · Issue #52 · Imgur/imgurpython
X Title: File handle not closed properly when uploading from path. · Issue #52 · Imgur/imgurpython
Description: Getting the warning ResourceWarning: unclosed file <_io.BufferedReader on Python 3.5.0. fd = open(path, 'rb') contents = fd.read() b64 = base64.b64encode(contents) fd isn't closed after uploading.
Open Graph Description: Getting the warning ResourceWarning: unclosed file <_io.BufferedReader on Python 3.5.0. fd = open(path, 'rb') contents = fd.read() b64 = base64.b64encode(contents) fd isn't closed after uploading.
X Description: Getting the warning ResourceWarning: unclosed file <_io.BufferedReader on Python 3.5.0. fd = open(path, 'rb') contents = fd.read() b64 = base64.b64encode(contents) fd isn't closed af...
Opengraph URL: https://github.com/Imgur/imgurpython/issues/52
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"File handle not closed properly when uploading from path.","articleBody":"Getting the warning `ResourceWarning: unclosed file \u003c_io.BufferedReader` on Python 3.5.0.\n\n``` Python\nfd = open(path, 'rb')\ncontents = fd.read()\nb64 = base64.b64encode(contents)\n```\n\nfd isn't closed after uploading.\n","author":{"url":"https://github.com/Melanpan","@type":"Person","name":"Melanpan"},"datePublished":"2015-11-23T00:19:32Z","url":"https://github.com/Imgur/imgurpython/issues/52"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0dadc909-700c-66e5-cff2-a002975d4287 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CAB8:46358:2B3F1FF:391FC8E:6B033415 |
| html-safe-nonce | 5e7ad695c66234e04b2a115f207b223240bfa712a5a961147acdc3cb9970b1fa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUI4OjQ2MzU4OjJCM0YxRkY6MzkxRkM4RTo2QjAzMzQxNSIsInZpc2l0b3JfaWQiOiIyNzI5MjM1MDUwMTg4MTkwNzQxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4e0579e8e3909acc464cee58c132bc67f20d987142f31fd9310c1d00a2a82153 |
| hovercard-subject-tag | issue:118300632 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Imgur/imgurpython/52/issue_layout |
| twitter:image | https://opengraph.githubassets.com/018116d3e776999d1669d15f9570f6acb593dea4774b6567744eccd416c82152/Imgur/imgurpython/issues/52 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/018116d3e776999d1669d15f9570f6acb593dea4774b6567744eccd416c82152/Imgur/imgurpython/issues/52 |
| og:image:alt | Getting the warning ResourceWarning: unclosed file <_io.BufferedReader on Python 3.5.0. fd = open(path, 'rb') contents = fd.read() b64 = base64.b64encode(contents) fd isn't closed after uploading. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Melanpan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/Imgur/imgurpython git https://github.com/Imgur/imgurpython.git |
| octolytics-dimension-user_id | 558067 |
| octolytics-dimension-user_login | Imgur |
| octolytics-dimension-repository_id | 13971811 |
| octolytics-dimension-repository_nwo | Imgur/imgurpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13971811 |
| octolytics-dimension-repository_network_root_nwo | Imgur/imgurpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width