-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
pytest fails to start with ValueError: unknown action "callback" #8921
Comments
Hi @aalouie, Please post the full output and the command you're trying to execute. |
Now it is displayed. |
at first glance this looks like a broken python where argparse is missing callback actions |
i took the liberty to add the tripple quotes for code around your traceback so its better readable |
@aalouie i believe we require a list of the pytest plugins, pytest itself doesn't use the feature, i suspect legacy code may be involved and/or a broken plugin |
@aalouie for more context - a very long while ago pytest used optparse instead of argparse optparse has |
So, how should I do to provide this list for you? |
Required-by: pytest-xdist, pytest-twisted, pytest-timeout, pytest-rerunfailures, pytest-pep8, pytest-ordering, pytest-metadata, pytest-instafail, pytest-html, pytest-for ked, pytest-flakes, pytest-django, pytest-cov, pytest-cache, pytest-bdd, pytest-asyncio Do you mean this? |
that looks like a reverse dependency, its not clear to me what else is in use in your codebase (im unfamiliar with anaconda as well) |
Yep, me too. absl-py 0.13.0 |
Do you have any idea to fix this? or to re-install python? |
my next recommendation is to grep your site packages for all files with a pytest_addoption, and then find all of those that pass a "callback" value as action - that will find the breaker |
Im using win10 64x, with Pycharm |
i have no idea how to "grep" on windows on linux i'd install "silver searcher" and run |
Hi RonnyPfannschmidt, I installed silver searcher, run: C:...\Python\Python39\Lib\site-packages/notebook/tests/conftest.py C:...\Python\Python39\Lib\site-packages/sympy/conftest.py |
If you look through those files below the line printed by ag, you should find the plugin which uses |
at first glance none of those seem responsible, the next step would be to run pytest with PYTEST_DEBUG=1 and see what invocations happen |
Hi RonnyPfannschmidt, |
i did a initial skim, i took note that the trace output is a pain wrt figuring which plugin however i saw oejskit - this is a plugin that's unmaintained since about a decade, the source repo of it is gone (bitbucket annihilated it) and its likely the cause |
|
uninstall it, and check what pulled it in |
uninstalled and here is the 2nd report. |
next one is a broken zmq install, no idea how to fix that on windows/conda, currently no pytest_debug needed |
doesn't work |
actually, the zmq is kept in version 0.0.0 and cannot be upgrade |
I believe that you have to use conda to manage it, I am unfamiliar with conda, and personally avoid it |
should i remove it? Im using Anaconda3 |
it report error while one by one importing the items of list: |
zeromq/pyzmq#1460 |
Hi RonnyPfannschmidt, PytestClickvConflict.txt |
Hi RonnyPfannschmidt, I uninstall python, pycharm, all plugins, re-install them, issue still raises. |
I recover this by manually clearing all files in folder site-packages->uninstall and re-install python. |
The text was updated successfully, but these errors were encountered: