Skip to content

IOError: close() called during concurrent operation on the same file object. #2370

Closed
@blockjon

Description

@blockjon

Occasionally, I get IOError: close() called during concurrent operation on the same file object. when my tests run. I'm not sure what I should do to resolve this.

PIP LIST:
https://gist.github.com/blockjon/787895c8f5aab3b2587051b919e4e037

PYTEST:
pytest (3.0.5)

OS:
Debian Jessie running Docker Container

TRACE:

00:03:04.535 Traceback (most recent call last):
00:03:04.535   File "runtests.py", line 107, in <module>
00:03:04.535     main()
00:03:04.535   File "runtests.py", line 99, in main
00:03:04.535     status = pytest.main(pytest_args)
00:03:04.535   File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line 57, in main
00:03:04.549     return config.hook.pytest_cmdline_main(config=config)
00:03:04.551   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
00:03:04.564     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
00:03:04.565   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
00:03:04.565     return self._inner_hookexec(hook, methods, kwargs)
00:03:04.566   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
00:03:04.566     _MultiCall(methods, kwargs, hook.spec_opts).execute()
00:03:04.566   File "/usr/local/lib/python2.7/dist-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
00:03:04.566     res = hook_impl.function(*args)
00:03:04.566   File "/usr/local/lib/python2.7/dist-packages/_pytest/main.py", line 127, in pytest_cmdline_main
00:03:04.574     return wrap_session(config, _main)
00:03:04.574   File "/usr/local/lib/python2.7/dist-packages/_pytest/main.py", line 123, in wrap_session
00:03:04.574     config._ensure_unconfigure()
00:03:04.575   File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line 897, in _ensure_unconfigure
00:03:04.577     fin()
00:03:04.577   File "/usr/local/lib/python2.7/dist-packages/_pytest/capture.py", line 82, in reset_capturings
00:03:04.577     cap.stop_capturing()
00:03:04.578   File "/usr/local/lib/python2.7/dist-packages/_pytest/capture.py", line 306, in stop_capturing
00:03:04.578     self.out.done()
00:03:04.578   File "/usr/local/lib/python2.7/dist-packages/_pytest/capture.py", line 378, in done
00:03:04.578     self.syscapture.done()
00:03:04.578   File "/usr/local/lib/python2.7/dist-packages/_pytest/capture.py", line 421, in done
00:03:04.578     self.tmpfile.close()
00:03:04.578 IOError: close() called during concurrent operation on the same file object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions