You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.
When I try to run a simple example on PyCG, it always raises exception pycg.machinery.imports.ImportManagerError.
My setting is as follow:
python version: 3.6.9
pycg commit: 99c991
I setup test directory like
mypkg/
__init__.py
main.py
and main.py contains
def foo():
bar()
def bar():
print('bar')
Running pycg --package mypkg mypkg/main.py -o cg.json raises an exception as follow:
Traceback (most recent call last):
File "/home/jwhur/.pyenv/versions/3.6.9/bin/pycg", line 11, in <module>
sys.exit(main())
File "/home/jwhur/.pyenv/versions/3.6.9/lib/python3.6/site-packages/pycg/__main__.py", line 79, in main
cg.analyze()
File "/home/jwhur/.pyenv/versions/3.6.9/lib/python3.6/site-packages/pycg/pycg.py", line 157, in analyze
self.class_manager, self.module_manager)
File "/home/jwhur/.pyenv/versions/3.6.9/lib/python3.6/site-packages/pycg/pycg.py", line 147, in do_pass
modules_analyzed=modules_analyzed, *args, **kwargs)
File "/home/jwhur/.pyenv/versions/3.6.9/lib/python3.6/site-packages/pycg/processing/preprocessor.py", line 33, in __init__
super().__init__(filename, modname, modules_analyzed)
File "/home/jwhur/.pyenv/versions/3.6.9/lib/python3.6/site-packages/pycg/processing/base.py", line 36, in __init__
with open(filename, "rt") as f:
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 894, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1157, in find_spec
File "<frozen importlib._bootstrap_external>", line 1129, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1273, in find_spec
File "<frozen importlib._bootstrap_external>", line 1229, in _get_spec
File "/home/jwhur/.pyenv/versions/3.6.9/lib/python3.6/site-packages/pycg/machinery/imports.py", line 39, in __init__
ig_obj.create_edge(self.fullname)
File "/home/jwhur/.pyenv/versions/3.6.9/lib/python3.6/site-packages/pycg/machinery/imports.py", line 87, in create_edge
raise ImportManagerError("Can't add edge to a non existing node")
pycg.machinery.imports.ImportManagerError: Can't add edge to a non existing node
The text was updated successfully, but these errors were encountered:
When I try to run a simple example on PyCG, it always raises exception
pycg.machinery.imports.ImportManagerError
.My setting is as follow:
python version:
3.6.9
pycg commit:
99c991
I setup test directory like
and
main.py
containsRunning
pycg --package mypkg mypkg/main.py -o cg.json
raises an exception as follow:The text was updated successfully, but these errors were encountered: