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

Pyan3 in a container not working. #99

Open
AIBappa opened this issue Nov 2, 2024 · 0 comments
Open

Pyan3 in a container not working. #99

AIBappa opened this issue Nov 2, 2024 · 0 comments

Comments

@AIBappa
Copy link

AIBappa commented Nov 2, 2024

Using following versions:
pyan3==1.1.1
python:3.7

Running following file to do a callgraph on all the files in the app folder.
import pyan

callgraph = pyan.create_callgraph('/app/**/*.py', format='dot')

with open('trial1.dot', 'w') as f:
f.write(callgraph)

Get an error as follows:
root@3463e99ee9fb:/test# python checkdep.py
Traceback (most recent call last):
File "checkdep.py", line 3, in
callgraph = pyan.create_callgraph('../app/**/*.py', format='dot')
File "/usr/local/lib/python3.7/site-packages/pyan/init.py", line 72, in create_callgraph
v = CallGraphVisitor(filenames)
File "/usr/local/lib/python3.7/site-packages/pyan/analyzer.py", line 75, in init
self.process()
File "/usr/local/lib/python3.7/site-packages/pyan/analyzer.py", line 82, in process
self.process_one(filename)
File "/usr/local/lib/python3.7/site-packages/pyan/analyzer.py", line 96, in process_one
self.visit(ast.parse(content, filename))
File "/usr/local/lib/python3.7/ast.py", line 271, in visit
return visitor(node)
File "/usr/local/lib/python3.7/site-packages/pyan/analyzer.py", line 340, in visit_Module
self.generic_visit(node) # visit the children of node
File "/usr/local/lib/python3.7/ast.py", line 279, in generic_visit
self.visit(item)
File "/usr/local/lib/python3.7/ast.py", line 271, in visit
return visitor(node)
File "/usr/local/lib/python3.7/site-packages/pyan/analyzer.py", line 752, in visit_AnnAssign
get_ast_node_name(value[0]),
IndexError: list index out of range

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

1 participant