Closed simbalsyd closed 3 years ago
i am also facing this issue I tried it on Python 3.6
I have the same problem
Same problem, too. And as it's automatically shipped to pypi, this means it's totally broken 😔.
I guess the problem is that CallGraphVisitor
is initialised with
def __init__(self, filenames, root: str = None, logger=None):
but is being called with
v = CallGraphVisitor(filenames, logger, root=root)
i.e. a mixed use of positional and keyword arguments, so a solution would be to either call with keyword arguments or to put the arguments in the correct order, but I'll leave it up to the developers which option they prefer...
Edit: did not see that a pull request was already created for this :)
I just installed pyan on Windows via pip install pyan3
and am encountering this bug. Is there a fix / workaround? I see that this bug may be fixed by Pull Request #65, but I don't know how to pick up that change in my Window 10 environment.
pip install pyan3=1.1.1
(last version) solves the problem.
pip install pyan3=1.1.1
(last version) solves the problem.
pyan3 **.py --root src --uses --no-defines --colored --grouped --annotated --html
Traceback (most recent call last):
File ".venv/bin/pyan3", line 8, in <module>
sys.exit(main())
File ".venv/lib/python3.8/site-packages/pyan/main.py", line 235, in main
v = CallGraphVisitor(filenames, logger)
File ".venv/lib/python3.8/site-packages/pyan/analyzer.py", line 75, in __init__
self.process()
File ".venv/lib/python3.8/site-packages/pyan/analyzer.py", line 85, in process
self.postprocess()
File ".venv/lib/python3.8/site-packages/pyan/analyzer.py", line 150, in postprocess
self.resolve_imports()
File ".venv/lib/python3.8/site-packages/pyan/analyzer.py", line 214, in resolve_imports
for candidate_to_node in self.defines_edges[to_node]: #
KeyError: <Node import:persistence.config>
Issues with relative imports?
# persistence.py
...
from . import config
...
pip install pyan3=1.1.1
(last version) solves the problem.
pip install pyan3==1.1.1
*syntax error
Please pull from git and retry. I merged pull request #65, which fixes this.
We'll make an updated package available shortly.
interestingly i used 1.2.0 and got this problem again, but when i downgraded it to 1.1.1 the problem disappears and pyan seems to work.
Still crashing. Windows 10, python 3.9.6, pyan3 version = 1.2.0. error dissapears in 1.1.1.
Encountered the same issue.
Python 3.8.0 pyan3 v1.2.0 (installed from pyan3-1.2.0-py3-none-any.whl) Ubuntu 18.04
pyan3 mymodule.py --uses --no-defines --colored --grouped --annotated --svg > myuses.svg
As others say (thanks!), using v1.1.1 made the problem go away.
Version 1.1.1 works properly, version 1.2.0 not. Unfortunately it seems that pyan3 is effectively abandoned.
Every time i try pyan3 on different projects it crash with the following results
Any ideas how to fix this?
I tried it on both Python 3.6 and 3.8 with the same results.