pydeps icon indicating copy to clipboard operation
pydeps copied to clipboard

Pydeps returning blank picture

Open anipan opened this issue 4 years ago • 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.

anipan avatar May 18 '21 17:05 anipan

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

thebjorn avatar May 19 '21 09:05 thebjorn

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.

machow avatar Jun 26 '21 15:06 machow

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

bcm0 avatar Jul 30 '21 20:07 bcm0

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).

thebjorn avatar Oct 11 '21 10:10 thebjorn