thebjorn / pydeps

Python Module Dependency graphs
https://pydeps.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
1.8k stars 114 forks source link

use of `--externals` results in TypeError: 'Config' object does not support item assignment #206

Open bhpayne opened 10 months ago

bhpayne commented 10 months ago

I just discovered this software and am grateful that it exists.

I tried using --externals but encountered an error:

pydeps --externals --noshow load_time.py 
Traceback (most recent call last):
  File "/usr/local/bin/pydeps", line 8, in <module>
    sys.exit(pydeps())
  File "/usr/local/lib/python3.9/site-packages/pydeps/pydeps.py", line 149, in pydeps
    _args['curdir'] = os.getcwd()
TypeError: 'Config' object does not support item assignment

I don't see a reason why that line https://github.com/thebjorn/pydeps/blob/master/pydeps/pydeps.py#L149 is sensitive to that flag.

Not including --externals does work,

pydeps --noshow load_time.py 

I'm running

python3 --version
Python 3.9.18
pydeps --version
pydeps v1.12.17

The script that I'm using pydeps to analyze is

cat load_time.py 
import time
thebjorn commented 10 months ago

Hi @bhpayne and thank you for your interest in pydeps. This bug is fixed in v.1.12.18 available on PyPI now.