You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This occurs when calling pytest --nbcheck=exec, resulting in the following error on Linux, but seemingly not on Windows (at least with GitHub Actions runners):
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/_pytest/main.py", line 266, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1054, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pluggy/_hooks.py", line 452, in call_historic
INTERNALERROR> res = self._hookexec(self.name, self._hookimpls, kwargs, False)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pluggy/_manager.py", line 112, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pluggy/_callers.py", line 116, in _multicall
INTERNALERROR> raise exception.with_traceback(exception.__traceback__)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pluggy/_callers.py", line 80, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/nbcheck/plugin.py", line 48, in pytest_configure
INTERNALERROR> raise ValueError(f"No entry_points plugins could be loaded for {entry_point_group_name!r}")
INTERNALERROR> ValueError: No entry_points plugins could be loaded for 'nbcheck.exec'
After researching possible causes, including:
pytest
setuptools
importlib-resources
importlib-metadata
pluggy
it seems the cause could be the updates between pluggy 1.0.0 and 1.2.0: pytest-dev/pluggy@1.0.0...1.2.0, in the sense that the same code in the same environment works when pluggy 1.0.0 is installed, and has the error above for 1.2.0.
The actual cause of the error is:
The pytest_configure() hook in nbcheck.plugin is for some reason run twice, leading to the error being raised the second time since no setuptools (entry points) plugins are added via load_setuptools_plugins as they were already registered
I'm not 100% sure why this only happens for nbcheck.exec and not nbcheck.static, but my guess is that it might have something to do with nbcheck.execution defining its own pytest_configure() hook with tryfirst=True
As to why this happens on Linux but not on Windows: 🤷♂️
At any rate, just reworking the after-loading verification logic, and using a warning instead of raising an exception just to be on the safe side, seem to work to resolve this (b4e2f91/0.2.2).
The text was updated successfully, but these errors were encountered:
This occurs when calling
pytest --nbcheck=exec
, resulting in the following error on Linux, but seemingly not on Windows (at least with GitHub Actions runners):INTERNALERROR> Traceback (most recent call last): INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/_pytest/main.py", line 266, in wrap_session INTERNALERROR> config._do_configure() INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/_pytest/config/__init__.py", line 1054, in _do_configure INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self)) INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pluggy/_hooks.py", line 452, in call_historic INTERNALERROR> res = self._hookexec(self.name, self._hookimpls, kwargs, False) INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pluggy/_manager.py", line 112, in _hookexec INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult) INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pluggy/_callers.py", line 116, in _multicall INTERNALERROR> raise exception.with_traceback(exception.__traceback__) INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pluggy/_callers.py", line 80, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/nbcheck/plugin.py", line 48, in pytest_configure INTERNALERROR> raise ValueError(f"No entry_points plugins could be loaded for {entry_point_group_name!r}") INTERNALERROR> ValueError: No entry_points plugins could be loaded for 'nbcheck.exec'
After researching possible causes, including:
it seems the cause could be the updates between pluggy 1.0.0 and 1.2.0: pytest-dev/pluggy@1.0.0...1.2.0, in the sense that the same code in the same environment works when pluggy 1.0.0 is installed, and has the error above for 1.2.0.
The actual cause of the error is:
pytest_configure()
hook innbcheck.plugin
is for some reason run twice, leading to the error being raised the second time since no setuptools (entry points) plugins are added viaload_setuptools_plugins
as they were already registerednbcheck.exec
and notnbcheck.static
, but my guess is that it might have something to do withnbcheck.execution
defining its ownpytest_configure()
hook withtryfirst=True
At any rate, just reworking the after-loading verification logic, and using a warning instead of raising an exception just to be on the safe side, seem to work to resolve this (b4e2f91/0.2.2).
The text was updated successfully, but these errors were encountered: