-
Notifications
You must be signed in to change notification settings - Fork 82
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
docker, AttributeError: module 'pytest' has no attribute 'StashKey' #193
Comments
Hey - I think this is due to the docker build test step failing due to the docker container using a very old version of pytest.
This version of pytest seems incompatible with pytest-timeout. To fix you can change the version in the setup.cfg.
I used 7.0.0 as it is the latest version which continues to have support for py36, py37 and py38. https://docs.pytest.org/en/stable/backwards-compatibility.html This resolves the error you are getting, but there are a large amount of tests which are failing.
I think these need to be individually fixed to resolve the docker compose. |
when I run docker-compose up, I met error:
251.2
251.2 The HTML pages are in build/sphinx/html.
251.4 + py.test tests
253.0 Traceback (most recent call last):
253.0 File "/opt/conda/bin//py.test", line 11, in
253.0 sys.exit(main())
253.0 File "/opt/conda/lib/python3.8/site-packages/_pytest/config/init.py", line 105, in main
253.0 config = _prepareconfig(args, plugins)
253.0 File "/opt/conda/lib/python3.8/site-packages/_pytest/config/init.py", line 257, in _prepareconfig
253.0 return pluginmanager.hook.pytest_cmdline_parse(
253.0 File "/opt/conda/lib/python3.8/site-packages/pluggy/hooks.py", line 286, in call
253.0 return self._hookexec(self, self.get_hookimpls(), kwargs)
253.0 File "/opt/conda/lib/python3.8/site-packages/pluggy/manager.py", line 93, in _hookexec
253.0 return self._inner_hookexec(hook, methods, kwargs)
253.0 File "/opt/conda/lib/python3.8/site-packages/pluggy/manager.py", line 84, in
253.0 self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
253.0 File "/opt/conda/lib/python3.8/site-packages/pluggy/callers.py", line 203, in _multicall
253.0 gen.send(outcome)
253.0 File "/opt/conda/lib/python3.8/site-packages/_pytest/helpconfig.py", line 90, in pytest_cmdline_parse
253.0 config = outcome.get_result()
253.0 File "/opt/conda/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
253.0 raise ex[1].with_traceback(ex[2])
253.0 File "/opt/conda/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
253.0 res = hook_impl.function(*args)
253.0 File "/opt/conda/lib/python3.8/site-packages/_pytest/config/init.py", line 836, in pytest_cmdline_parse
253.0 self.parse(args)
253.0 File "/opt/conda/lib/python3.8/site-packages/_pytest/config/init.py", line 1044, in parse
253.0 self._preparse(args, addopts=addopts)
253.0 File "/opt/conda/lib/python3.8/site-packages/_pytest/config/init.py", line 992, in _preparse
253.0 self.pluginmanager.load_setuptools_entrypoints("pytest11")
253.0 File "/opt/conda/lib/python3.8/site-packages/pluggy/manager.py", line 299, in load_setuptools_entrypoints
253.0 plugin = ep.load()
253.0 File "/opt/conda/lib/python3.8/importlib/metadata.py", line 77, in load
253.0 module = import_module(match.group('module'))
253.0 File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module
253.0 return _bootstrap._gcd_import(name[level:], package, level)
253.0 File "", line 1014, in _gcd_import
253.0 File "", line 991, in _find_and_load
253.0 File "", line 975, in _find_and_load_unlocked
253.0 File "", line 671, in _load_unlocked
253.0 File "/opt/conda/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 152, in exec_module
253.0 exec(co, module.dict)
253.0 File "/opt/conda/lib/python3.8/site-packages/pytest_timeout.py", line 22, in
253.0 SESSION_TIMEOUT_KEY = pytest.StashKeyfloat
253.0 AttributeError: module 'pytest' has no attribute 'StashKey'
failed to solve: process "/bin/sh -c set -eux ; pip install -e ".[prometheus, test, docs]" ; python -m ipykernel install --user --name=notebooker_kernel ; pip install nbformat jupyter-core jupyter-client Pandoc --upgrade ; pip install -r ./notebooker/notebook_templates_example/notebook_requirements.txt ; python setup.py develop ; python setup.py build_sphinx ; py.test tests ; python setup.py bdist_wheel --universal" did not complete successfully: exit code: 1
The text was updated successfully, but these errors were encountered: