thebjorn/pydeps

Pydeps returning blank picture

Closed this issue · 4 comments

Hello,

I am trying to create a dependency graph for a package with multiple python files in a folder. When I try to run pydeps on any of the files, it returns a blank picture. Do I have to add more arguments for the python module that I am trying to run through pydeps? If so, how can I do this?

I apologize if this question is a bit unclear or has already been answered; I am quite new to this.

Given the following structure:

(dev35) go|c:\srv\tmp\issue91> yamldirs myapp
myapp:
  a.py: from . import b
  __init__.py: ''
  b.py: ''

i.e. a subdirectory myapp with 3 files: __init__.py (empty), b.py (empty), and a.py containing the line

from . import b

the following pydeps invocation (i.e. current directory is the parent directory, calling pydeps with the name of the package folder):

(dev35) go|c:\srv\tmp\issue91> pydeps myapp

produces the following graph:

myapp

I've noticed that if there are issues with imports (e.g. the code tries to import something that doesn't exist), then it sometimes returns an empty graph. For example, if in your above example you replaced a.py...

  • old: from . import b
  • new: import b

The graph is blank.

bcm0 commented

The graph is blank.
Same for me and hard to debug because --debug flag does not output anything

To include packages that are not installed, you'll need the --include-missing flag. To debug problems with the module finding, use the --debug-mf <int> flag (I would suggest starting with 2 as the int-value.. the output is voluminous).