Recently I installed pyan and try to use it to generate a graph of my python script. Unfortunately I encountered an error. Here is my installation command and my python is 3.8.0:
It didn't work as expected but give an error as below:
Traceback (most recent call last):
File "/home/wangjie/miniconda3/envs/straglr/bin/pyan3", line 8, in <module>
sys.exit(main())
File "/home/wangjie/miniconda3/envs/straglr/lib/python3.8/site-packages/pyan/main.py", line 208, in main
v = CallGraphVisitor(filenames, logger=logger, root=root)
File "/home/wangjie/miniconda3/envs/straglr/lib/python3.8/site-packages/pyan/analyzer.py", line 60, in __init__
mod_name = get_module_name(filename)
File "/home/wangjie/miniconda3/envs/straglr/lib/python3.8/site-packages/pyan/anutils.py", line 41, in get_module_name
print(os.listdir(potential_root))
FileNotFoundError: [Errno 2] No such file or directory: ''
After some simple inspections of these codes that raising errors, I guess it is the problem of --root parameter. But it is inferred by default so I don't know how to fix it. Could you give some suggestions?
Hi,
Recently I installed pyan and try to use it to generate a graph of my python script. Unfortunately I encountered an error. Here is my installation command and my python is 3.8.0:
While I run the command for my own script:
It didn't work as expected but give an error as below:
After some simple inspections of these codes that raising errors, I guess it is the problem of
--root
parameter. But it is inferred by default so I don't know how to fix it. Could you give some suggestions?Thanks!
JieWang