-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internalerror KeyError: <class '_io.BufferedReader'> #349
Comments
Hi @pv, I suspect your code emitting a warning which contains a When you run without xdist, do you see any warnings which might fit the bill? |
Yes, there are |
Hi @pv,
Yes, you are absolutely right. |
Hi! I have the similar problem at 1.23.0+ version. At 1.23.0 work correcly. platform win32 -- Python 3.6.6, pytest-3.9.3, py-1.7.0, pluggy-0.8.0 -- c:\service_test\.venv\scripts\python.exe
cachedir: .pytest_cache
rootdir: c:\service_test, inifile: pytest.ini
plugins: xdist-1.23.2, timeout-1.3.2, repeat-0.7.0, forked-0.2, allure-adaptor-1.7.10
timeout: 60.0s
timeout method: thread
timeout func_only: False
[gw0] win32 Python 3.6.6 cwd: c:\service_test
[gw1] win32 Python 3.6.6 cwd: c:\service_test
[gw0] Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]
[gw1] Python 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)]
gw0 [27] / gw1 [27]
scheduling tests via LoadScheduling
tests/test_.py::TestArbitrmanagers::test__
tests/test_arbitrmanagers/test_arbitrmanagers.py::TestArbitrmanagers::test_am_with_valid_sro
[gw0] [ 3%] PASSED tests/test_.py::TestArbitrmanagers::test__
tests/test_arbitrmanagers/test_arbitrmanagers.py::TestArbitrmanagers::test_am_inn
[gw1] [ 7%] PASSED tests/test_arbitrmanagers/test_arbitrmanagers.py::TestArbitrmanagers::test_am_with_valid_sro
[gw0] [ 11%] PASSED tests/test_arbitrmanagers/test_arbitrmanagers.py::TestArbitrmanagers::test_am_inn INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1383, in _save
INTERNALERROR> dispatch = self._dispatch[tp]
INTERNALERROR> KeyError: <class 'sqlalchemy.util.langhelpers._hash_limit_string'>
INTERNALERROR>
INTERNALERROR> During handling of the above exception, another exception occurred:
INTERNALERROR>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\main.py", line 184, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\main.py", line 224, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\hooks.py", line 284, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 67, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 61, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1383, in _save
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR> dispatch = self._dispatch[tp]
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> KeyError: <class 'sqlalchemy.util.langhelpers._hash_limit_string'>
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR>
INTERNALERROR> During handling of the above exception, another exception occurred:
INTERNALERROR>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\main.py", line 184, in wrap_session
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "<remote exec>", line 65, in pytest_runtestloop
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\main.py", line 224, in _main
INTERNALERROR> File "<remote exec>", line 82, in run_one_test
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\hooks.py", line 284, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\hooks.py", line 284, in __call__
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 67, in _hookexec
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 67, in _hookexec
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 61, in <lambda>
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 61, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 203, in _multicall
INTERNALERROR> gen.send(outcome)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\warnings.py", line 138, in pytest_runtest_protocol
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> yield
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR> File "c:\python36\Lib\contextlib.py", line 88, in __exit__
INTERNALERROR> return outcome.get_result()
INTERNALERROR> next(self.gen)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\warnings.py", line 97, in catch_warnings_for_item
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> kwargs=dict(warning_message=warning_message, when=when, item=item)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\hooks.py", line 306, in call_historic
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "<remote exec>", line 65, in pytest_runtestloop
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 67, in _hookexec
INTERNALERROR> File "<remote exec>", line 82, in run_one_test
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\hooks.py", line 284, in __call__
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 61, in <lambda>
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 67, in _hookexec
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 61, in <lambda>
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 203, in _multicall
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR> gen.send(outcome)
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\warnings.py", line 138, in pytest_runtest_protocol
INTERNALERROR> File "<remote exec>", line 135, in pytest_warning_captured
INTERNALERROR> yield
INTERNALERROR> File "<remote exec>", line 29, in sendevent
INTERNALERROR> File "c:\python36\Lib\contextlib.py", line 88, in __exit__
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 717, in send
INTERNALERROR> next(self.gen)
INTERNALERROR> self.gateway._send(Message.CHANNEL_DATA, self.id, dumps_internal(item))
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\warnings.py", line 97, in catch_warnings_for_item
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1354, in dumps_internal
INTERNALERROR> kwargs=dict(warning_message=warning_message, when=when, item=item)
INTERNALERROR> return _Serializer().save(obj)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\hooks.py", line 306, in call_historic
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1372, in save
INTERNALERROR> res = self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> self._save(obj)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 67, in _hookexec
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1390, in _save
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 61, in <lambda>
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1475, in save_tuple
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> self._save(item)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1390, in _save
INTERNALERROR> return outcome.get_result()
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1471, in save_dict
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> self._write_setitem(key, value)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1465, in _write_setitem
INTERNALERROR> self._save(value)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1390, in _save
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "<remote exec>", line 135, in pytest_warning_captured
INTERNALERROR> File "<remote exec>", line 29, in sendevent
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 717, in send
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1471, in save_dict
INTERNALERROR> self.gateway._send(Message.CHANNEL_DATA, self.id, dumps_internal(item))
INTERNALERROR> self._write_setitem(key, value)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1354, in dumps_internal
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1465, in _write_setitem
INTERNALERROR> return _Serializer().save(obj)
INTERNALERROR> self._save(value)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1372, in save
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1390, in _save
INTERNALERROR> self._save(obj)
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1390, in _save
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1475, in save_tuple
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> self._save(item)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1475, in save_tuple
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1388, in _save
INTERNALERROR> self._save(item)
INTERNALERROR> raise DumpError("can't serialize %s" % (tp,))
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1390, in _save
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1471, in save_dict
INTERNALERROR> execnet.gateway_base.DumpError: can't serialize <class 'sqlalchemy.util.langhelpers._hash_limit_string'>
INTERNALERROR> self._write_setitem(key, value)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1465, in _write_setitem
INTERNALERROR> self._save(value)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1390, in _save
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1471, in save_dict
INTERNALERROR> self._write_setitem(key, value)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1465, in _write_setitem
INTERNALERROR> self._save(value)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1390, in _save
INTERNALERROR> dispatch(self, obj)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1475, in save_tuple
INTERNALERROR> self._save(item)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\execnet\gateway_base.py", line 1388, in _save
INTERNALERROR> raise DumpError("can't serialize %s" % (tp,))
INTERNALERROR> execnet.gateway_base.DumpError: can't serialize <class 'sqlalchemy.util.langhelpers._hash_limit_string'>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\main.py", line 184, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\_pytest\main.py", line 224, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\hooks.py", line 284, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 67, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\manager.py", line 61, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\xdist\dsession.py", line 115, in pytest_runtestloop
INTERNALERROR> self.loop_once()
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\xdist\dsession.py", line 138, in loop_once
INTERNALERROR> call(**kwargs)
INTERNALERROR> File "c:\service_test\.venv\lib\site-packages\xdist\dsession.py", line 180, in worker_workerfinished
INTERNALERROR> assert not crashitem, (crashitem, node)
INTERNALERROR> AssertionError: ('tests/test_arbitrmanagers/test_arbitrmanagers.py::TestArbitrmanagers::()::test_am_inn', <WorkerController gw0>)
INTERNALERROR> assert not 'tests/test_arbitrmanagers/test_arbitrmanagers.py::TestArbitrmanagers::()::test_am_inn' |
Not sure what's exactly going on but pytest-xdist started emitting INTERNALERRORs and failing in version 1.23.1 (and 1.23.2). pytest-xdist-1.23.0 does not emit these.
EDIT: minimal repro:
To reproduce:
The text was updated successfully, but these errors were encountered: