CI: Flaky ResourceWarning('unclosed file <_io.BufferedRandom ...
See original GitHub issuePrevious debugging attempt: https://github.com/pandas-dev/pandas/pull/44634
Since it’s a io.BufferedRandom
, it should be a file handle opened in +
mode: https://github.com/pandas-dev/pandas/pull/44634#issuecomment-981260080
This only appears when tm.assert_produces_warning
is called since it’s checking for extra warnings. It’s likely coming from an optional dependency at this point, but unconfirmed.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Reportlab Image - ResourceWarning: unclosed file <_io ...
It seems that reportlab expects that you open and close the image file. Use with open(logo_path, 'rb') as image_fd: .
Read more >python - Getting warning from unit test - SQA Stack Exchange
Just reported this problem as a new issue: ResourceWarning: unclosed file <_io.BufferedReader... in static_file(). And, until it is fixed, you ...
Read more >Diff - platform/external/python/cpython3 - android Git repositories
So "unclosed file" resource + warnings are now correctly emitted for daemon threads. + +- Issue #19514: Deduplicate some _Py_IDENTIFIER declarations.
Read more >Release notes for Python 3.5.4
bpo-28929: Link the documentation to its source file on GitHub. ... bpo-11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper object is ...
Read more >Issue 19829: _pyio.BufferedReader and _pyio.TextIOWrapper ...
open("/etc/issue", "rb", 0); f=None __main__:1: ResourceWarning: unclosed file <_io.FileIO name='/etc/issue' mode='rb'> >>> import io >>> f=io.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Logging these warnings when they pop up
2021-12-15, #44908, py39GHA,
test_dialect_conflict_delimiter
,<_io.BufferedRandom name=13>
,(pandas/tests/io/parser/conftest.py', 22)
Thanks, but I believe we’ve been seeing this error in the CI prior to that PR.