module 'lazr' breaks pydeps
See original GitHub issueTested on Linux, Ubuntu 20.04.
Consider this oneliner test program test_pydeps.py
:
import lazr
Run pydeps on it. It will give an enormous stacktrace, this is the tail:
File "/home/jan/.local/lib/python3.8/site-packages/pydeps/py2depgraph.py", line 139, in import_module
module = mf27.ModuleFinder.import_module(self, partnam, fqname, parent)
File "/usr/lib/python3.8/modulefinder.py", line 318, in import_module
fp, pathname, stuff = self.find_module(partname,
File "/usr/lib/python3.8/modulefinder.py", line 510, in find_module
return _find_module(name, path)
File "/usr/lib/python3.8/modulefinder.py", line 79, in _find_module
if spec.loader.is_package(name):
AttributeError: 'NoneType' object has no attribute 'is_package'
Excepted result: a more descriptive error or warning, mentioning lazr
, perhaps guiding the user to exclude it?
I ran into this problem when I tried to analyze my own project. Had to sprinkle some print statements in pydeps to figure out that lazr
was the problem.
Workaround which works fine for me: just exclude lazr
.
PS: I have no clue what lazr
is, how it found its way onto my system, and why it is so special for pydeps; I just happen to implicitly use it in my project.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
pydeps - Visualizes Python module dependencies. - GitHub
Visualizes dependencies between Python modules. Usage. Just run the pydeps.py command with a path to a directory containing Python source files.
Read more >pydeps — pydeps 1.11.0 documentation
Python module dependency visualization. This package is primarly intended to be used from the command line through the pydeps command. Contents. pydeps.
Read more >pydeps fails to generate dependency graph - python
I'm attempting to use the Python module pydeps (installed with mamba install pydeps ) to analyze the dependencies in my project.
Read more >devel/py-setuptools: Python packages installer - FreshPorts
Setuptools is a fully-featured, actively-maintained, and stable library designed to facilitate packaging Python projects, where packaging includes: - Python ...
Read more >Simple index - piwheels
... xxxy-test mitoinstall prespy repo-gist-sync psap inmanta-module-dummy-module odoo13-addon-partner-contact-gender python-google-image-search pypiwrapper ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Solved indeed, many thanks!
This should be fixed in the latest version (v1.10.17) available on PyPI.