-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Labels
Description
Hi, I was trying to give pydeps a try on a project which has sympy as a dependency and hit an error: RecursionError: maximum recursion depth exceeded while calling a Python object. I don't know if this is a bug in pydeps or sympy, but figured I'd report it here in case its something pydeps can handle. The error occurs with the default args, and with --show-cycles.
If there's any more debug info I can provide, let me know. Thanks!
$ mkdir pdeptest
$ python3.7 -m venv pdeptest/
$ cd pdeptest/ && source bin/activate
(pdeptest) $ pip install pydeps
Collecting pydeps
... <snip> ...
Successfully installed pydeps-1.7.3 stdlib-list-0.5.0
(pdeptest) $ pip install sympy
Collecting sympy
... <snip> ...
Successfully installed mpmath-1.1.0 sympy-1.4
(pdeptest) $ echo 'import sympy' > test.py
(pdeptest) $ pydeps test.py
Traceback (most recent call last):
File "/Users/kevin.krsulichibm.com/pdeptest/bin/pydeps", line 11, in <module>
load_entry_point('pydeps==1.7.3', 'console_scripts', 'pydeps')()
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/pydeps.py", line 131, in pydeps
return _pydeps(inp, **_args)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/pydeps.py", line 30, in _pydeps
dep_graph = py2depgraph.py2dep(trgt, **kw)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/py2depgraph.py", line 214, in py2dep
mf.run_script(dummy.fname)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/mf27.py", line 117, in run_script
self.load_module('__main__', fp, pathname, stuff)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/py2depgraph.py", line 146, in load_module
self, fqname, fp, pathname, (suffix, mode, kind)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/mf27.py", line 335, in load_module
self.scan_code(co, module)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/mf27.py", line 472, in scan_code
self._safe_import_hook(name, module, fromlist, level=level)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/mf27.py", line 353, in _safe_import_hook
self.import_hook(name, caller, level=level)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/py2depgraph.py", line 116, in import_hook
return mf27.ModuleFinder.import_hook(self, name, caller, fromlist, level)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/mf27.py", line 130, in import_hook
q, tail = self.find_head_package(parent, name)
... <snip> ...
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/py2depgraph.py", line 146, in load_module
self, fqname, fp, pathname, (suffix, mode, kind)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/mf27.py", line 335, in load_module
self.scan_code(co, module)
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/mf27.py", line 456, in scan_code
for what, args in scanner(co):
File "/Users/kevin.krsulichibm.com/pdeptest/lib/python3.7/site-packages/pydeps/mf27.py", line 431, in scan_opcodes_34
bytecode = list(dis.Bytecode(co))
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/dis.py", line 478, in __init__
self._linestarts = dict(findlinestarts(co))
File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/dis.py", line 448, in findlinestarts
for byte_incr, line_incr in zip(byte_increments, line_increments):
RecursionError: maximum recursion depth exceeded while calling a Python object