Open lilymooncake opened 1 year ago
my workaround: go to => site-packages/wrapt/decorators.py and change all "formatargspec" to "formatargvalues"
You look to be using an old wrapt version. Are you pinning the version? You need to be using at least wrapt 1.14.0 if using Python 3.11.
@GrahamDumpleton I updated the version information that I've used (which is 1.15.0)
And are you suggesting that it still fails with 1.15.0, or does it now work?
Hi Graham, I went to site-packages/wrapt/decorators.py and change all "formatargspec" to "formatargvalues"
That isn't what I am asking. I am asking for clarification that if you ensure you are using version 1.15.0 that still had the issue.
The traceback you give above is not for when using version 1.15.0.
The trackback shows:
File "/Users/summer/.cache/pre-commit/reponeoe_8g3/py_env-python3.11/lib/python3.11/site-packages/wrapt/decorators.py", line 34, in <module>
from inspect import ismethod, isclass, formatargspec
ImportError: cannot import name 'formatargspec' from 'inspect' (/opt/homebrew/Cellar/python@3.11/3.11.4/Frameworks/Python.framework/Versions/3.11/lib/python3.11/inspect.py)
But line 34 in version 1.15.0 (latest) doesn't look like that, so you must be on an older version. See what latest code looks like at:
which should show:
from inspect import isclass
from threading import Lock, RLock
from .arguments import formatargspec
So it doesn't import formatargspec
from inspect
, but uses a local version.
I would suggest you pip uninstall wrapt
and re-install it with latest to make sure is replacing older version.
Thanks, Graham, I did but it still happens and only can be solved by the workaround. However, this ticket can be closed.
If the code doesn't look like what I linked in the GitHub repo, then something is causing you to be pinned to an older version of wrapt.
If you are adamant that the code does match what is in the repo, then run:
pip freeze
and provide the output so can confirm what version pip
thinks you have installed.
Also run the Python command line interpreter and from it do:
import wrapt
print(wrapt.__version_info__)
and see what the wrapt
package itself says it is. Provide this output as well.
I would not be surprised if you are using some third party package which has pinned to an old version of wrapt and so when you install things it is being force to the old version.
logs below