Skip to content

Pyan crashes when i give filename or don't give  #70

@sunil-cred

Description

@sunil-cred
pyan *.py --uses --no-defines --colored --grouped --annotated --dot >myuses.dot
Traceback (most recent call last):
  File "/home/darknight/.local/bin/pyan", line 143, in <module>
    main()
  File "/home/darknight/.local/bin/pyan", line 115, in main
    v = CallGraphVisitor(filenames, logger)
  File "/home/darknight/.local/lib/python3.8/site-packages/pyan/analyzer.py", line 60, in __init__
    mod_name = get_module_name(filename)
  File "/home/darknight/.local/lib/python3.8/site-packages/pyan/anutils.py", line 40, in get_module_name
    is_root = any([f == "__init__.py" for f in os.listdir(potential_root)])
FileNotFoundError: [Errno 2] No such file or directory: ''

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions