Skip to content

AttributeError: '_HookCaller' object has no attribute 'spec_opts' #1310

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

Closed
ionelmc opened this issue Jan 6, 2016 · 2 comments
Closed

AttributeError: '_HookCaller' object has no attribute 'spec_opts' #1310

ionelmc opened this issue Jan 6, 2016 · 2 comments

Comments

@ionelmc
Copy link
Member

ionelmc commented Jan 6, 2016

I get this error with 2.8.5, but only on python2.6 it seems:

INTERNALERROR> Traceback (most recent call last):

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/_pytest/main.py", line 86, in wrap_session

INTERNALERROR>     config._do_configure()

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/_pytest/config.py", line 830, in _do_configure

INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/_pytest/vendored_packages/pluggy.py", line 729, in call_historic

INTERNALERROR>     self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/_pytest/vendored_packages/pluggy.py", line 338, in _hookexec

INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/_pytest/vendored_packages/pluggy.py", line 333, in <lambda>

INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/_pytest/vendored_packages/pluggy.py", line 596, in execute

INTERNALERROR>     res = hook_impl.function(*args)

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/pytest_benchmark/plugin.py", line 373, in pytest_configure

INTERNALERROR>     config._benchmarksession = BenchmarkSession(config)

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/pytest_benchmark/session.py", line 36, in __init__

INTERNALERROR>     self.machine_info = config.hook.pytest_benchmark_generate_machine_info(config=self.config)

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/_pytest/vendored_packages/pluggy.py", line 724, in __call__

INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/_pytest/vendored_packages/pluggy.py", line 338, in _hookexec

INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)

INTERNALERROR>   File "/home/travis/build/ionelmc/pytest-benchmark/.tox/2.6-pytest28-xdist-nocov/lib/python2.6/site-packages/_pytest/vendored_packages/pluggy.py", line 333, in <lambda>

INTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()

INTERNALERROR> AttributeError: '_HookCaller' object has no attribute 'spec_opts'

Any clues? Should I try to make a smaller repro?

@ionelmc
Copy link
Member Author

ionelmc commented Jan 6, 2016

Ah yes, it only happens with xdist (using 1.13.1). Could it be that I call the hook "too early"? (i'm calling it from pytest_configure)

@nicoddemus
Copy link
Member

Thanks @ionelmc!

Closing this as a duplicate of #1062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants