Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CallGraphVisitor wrong parameters #96

Open
mhechthz opened this issue Mar 25, 2024 · 1 comment
Open

CallGraphVisitor wrong parameters #96

mhechthz opened this issue Mar 25, 2024 · 1 comment

Comments

@mhechthz
Copy link

It seems that the library is somewhat outdated. I get with Python 3.11:

pyan3 *.py --uses --no-defines --colored --grouped --annotated --svg > callgraph.svg
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Python311\Scripts\pyan3.exe\__main__.py", line 7, in <module>
  File "C:\Python311\Lib\site-packages\pyan\main.py", line 206, in main
    v = CallGraphVisitor(filenames, logger, root=root)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: CallGraphVisitor.__init__() got multiple values for argument 'root'

Seems that there was a change in how to call the function. Is this library still maintained?

@egoughnour
Copy link

See [Fix wrong arguments for CallGraphVisitor] (#65).
Also the comments on got multiple values for ....
You can install, open line 206 and insert =logger so that the second arg becomes a kwarg, i.e.,
CallGraphVisitor(filenames, logger=logger, root=root)
Then calling with an absolute path to your glob and setting the --root might help.
Anyway this seems to be a non-issue when calling programmatically. So you might try importing and going from there--as suggested in the discussion of the second issue linked above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants