pytype icon indicating copy to clipboard operation
pytype copied to clipboard

Couldn't import pyi for 'importlib.machinery' [pyi-error]

Open dseomn opened this issue 3 years ago • 1 comments

https://github.com/google/python-spanner-orm/actions/runs/3093645525/jobs/5006240200 is giving us the below error and the link says to file a bug, so here's a bug.

File "/home/runner/work/python-spanner-orm/python-spanner-orm/spanner_orm/admin/migration_manager.py", line 77, in _migration_from_file: Couldn't import pyi for 'importlib.machinery' [pyi-error]
  Can't find pyi for 'importlib.metadata.DistributionFinder', referenced from 'importlib.machinery'
Called from (traceback):
  line 93, in _all_migrations

For more details, see https://google.github.io/pytype/errors.html#pyi-error

dseomn avatar Sep 20 '22 21:09 dseomn

We're assuming importlib.metadata.DistributionFinder is a name here, when it's actually a nested class: http://google3/third_party/py/pytype/load_pytd.py;l=598;rcl=469523555

rchen152 avatar Sep 22 '22 07:09 rchen152