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

FileNotFoundError: [Errno 2] No such file or directory: '' #83

Open
Jesson-mark opened this issue Feb 17, 2022 · 2 comments
Open

FileNotFoundError: [Errno 2] No such file or directory: '' #83

Jesson-mark opened this issue Feb 17, 2022 · 2 comments

Comments

@Jesson-mark
Copy link

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:

pip install git+https://github.com/Technologicat/pyan.git

While I run the command for my own script:

pyan3 tre_graph.py --uses --no-defines --colored --grouped --annotated --dot > tre.dot

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?

Thanks!

JieWang

@FabienPertuy
Copy link

Looks the same as #70

@ColtAllen
Copy link

Would it be possible to proceed with publishing the next version release seeing as this issue is now fixed?

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

3 participants