Open sunil-cred opened 3 years ago
Same problem. Some investigation shows that it occurs when traversing up the path to search for the root. The problem is that os.path.dirname()
returns an empty string for the top of a relative path (e.g. os.path.dirname("src")
).
It can be avoided by specifying an absolute path to a python file. However, this has the undesired effect that the full path is also shown when annotated=True
.
I've seen the bug was already corrected in master. Would it be possible to make a PyPI release with the correction (1.2.1)? I know it is a small bug, but it is a pain to have to install it through github (or at least it is a pain to tell people that's also a solution). Thank you!
The bug still exists in this version: pip3 install git+https://github.com/Technologicat/pyan.git But passing absolute path for the python file solved the error.
This was solved for me by https://github.com/Technologicat/pyan/pull/74
To install it I used pip install git+https://github.com/maciejczyzewski/pyan