sec-edgar / sec-edgar

Download all companies periodic reports, filings and forms from EDGAR database.
https://sec-edgar.github.io/sec-edgar/
Apache License 2.0
1.01k stars 287 forks source link

Missing dependency on 'click' #291

Open L33T-KING opened 1 year ago

L33T-KING commented 1 year ago

I installed sec-edgar via pip in a fresh virtual environment and attempted to run the secedgar command, but received a ModuleNotFoundError indicating that the click module was not found.

Here's the full traceback:

Traceback (most recent call last): File "/Users/home/envDir/bin/secedgar", line 33, in sys.exit(load_entry_point('secedgar==0.4.1', 'console_scripts', 'secedgar')()) File "/Users/home/envDir/bin/secedgar", line 25, in importlib_load_entry_point return next(matches).load() File "/Users/home/anaconda3/lib/python3.10/importlib/metadata/init.py", line 171, in load module = import_module(match.group('module')) File "/Users/home/anaconda3/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/Users/home/envDir/lib/python3.10/site-packages/secedgar/cli.py", line 4, in import click ModuleNotFoundError: No module named 'click'

I was able to resolve this issue by manually installing click with pip. However, it seems like click should be declared as a dependency of sec-edgar so that it gets installed automatically.

sec-edgar version: 0.4.1 OS version: macOS 13.2.1 (Ventura) Installed Packages: Package==Version

aiohttp==3.7.4.post0 async-timeout==3.0.1 attrs==23.1.0 beautifulsoup4==4.12.2 certifi==2023.5.7 chardet==4.0.0 charset-normalizer==3.1.0 idna==3.4 lxml==4.9.2 multidict==6.0.4 requests==2.31.0 secedgar==0.4.1 soupsieve==2.4.1 tqdm==4.65.0 typing_extensions==4.6.2 urllib3==2.0.2 yarl==1.9.2

jackmoody11 commented 1 year ago

Thanks for pointing this out. We currently have it so that the CLI is an additional requirement (pandas does this for its Excel dependencies). I thought we had documented this, but I can't seem to find it. Right now, you have to pip install secedgar[cli] to get dependencies for the CLI. Might be simpler to change that. Not sure. Didn't want to add too many dependencies and wasn't sure how often users would use the CLI vs. the other parts of the core library.