Technologicat / pyan

Static call graph generator. The official Python 3 version. Development repo.
GNU General Public License v2.0
323 stars 56 forks source link

Would like to generate call graph for a very basic file #86

Open amine-aboufirass opened 1 year ago

amine-aboufirass commented 1 year ago

I'd like to generate a call graph for the following minimum working example:

def g(x):
    return x+2

def h(x):
    return x*7

def f(x):
    r = g(x)
    s = h(r)
    return s

if __name__=="__main__":
    print(f(3))

I tried the following command:

pyan3 test.py --dot

But I got an error:

TypeError: init() got multiple values for argument 'root'

What am I doing wrong here?

romain-dartigues commented 1 year ago

This is an unfortunate bug in version 1.20; downgrade to the previous version (ie: python -m pip install pyan3==1.1.1).

Duplicate of,at least, #79, #72 and #64.

fleckmg commented 1 year ago

The current release containing this bug will be 2 years old next week.

Seems pyan is dead?

Anyway, thanks for the workaround