Skip to content
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

如果遇到AttributeError: 'Context' object has no attribute 'pattern'可以升级一下importlib-metadata #1

Open
peterz3g opened this issue Mar 8, 2024 · 0 comments

Comments

@peterz3g
Copy link

peterz3g commented Mar 8, 2024

vscode 做debug时报错:
for element in iterable:
File "/usr/local/lib/python3.10/importlib/metadata/init.py", line 565, in
resolver(context) for resolver in cls._discover_resolvers()
File "/home/vscode/.local/lib/python3.10/site-packages/importlib_metadata/init.py", line 417, in find_distributions
found = self._search_paths(context.pattern, context.path)
AttributeError: 'Context' object has no attribute 'pattern'

pip install --upgrade importlib-metadata 执行一下,把:
importlib-metadata 0.23 --》 importlib_metadata 7.0.2

可以了。

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

1 participant