john-friedman / datamule-python

A package to work with SEC data. Incorporates datamule endpoints.
MIT License
73 stars 7 forks source link

Two issues: Error while installing datamule[all] and importing datamule after installing the basic package #3

Closed agemineye closed 1 month ago

agemineye commented 1 month ago

Two issues:

  1. Unable to install datamule[all] `python -m pip install datamule[all]

    zsh: no matches found: datamule[all]`

  2. After successfully installing the basic version (pip install datamule), getting the following error when trying to import datamule: `>>> import datamule as dm

    Traceback (most recent call last): File "", line 1, in import datamule as dm File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/datamule/init.py", line 21, in from .sec_downloader import Downloader File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/datamule/sec_downloader.py", line 14, in from pkg_resources import resource_filename ModuleNotFoundError: No module named 'pkg_resources'`

john-friedman commented 1 month ago

Gotcha. Just pushed a patch that should fix your error. What IDE are you using? (e.g. vscode, colab,..)

For 1. I think the command for shell is python -m pip install "datamule[all]" . (I use command prompt)

john-friedman commented 1 month ago

I think the issue was that setuptools was not declared as a requirement in the datamule setup.py, which works for most environments but not yours.

agemineye commented 1 month ago

Hello John,

Thank you for your quick reply, guidance, and contribution to the community.

I am using command prompt on a Mac as well. The quotes "datamule[all]" did the trick.

I guess that the [all] option also installs setuptools (?), as when I tried installing setuptools, I got a prompt that the 'requirements were already satisfied'.

I look forward to using datamule!

P.S. Now off to figure out how to rename the files to reflect ticker/cik + Year and then extract the required information :)

john-friedman commented 1 month ago

Something that may be useful for you to know is that accension number is cik - year - number of filings. So 000119312515118890 is cik 0001193125 year 2015. Using packages company tickers data with accession number cik should work for your case.

Btw, what data are you trying to extract?

agemineye commented 1 month ago

Thanks you, John. I sent you a Linkedin request. May be we could chat there?

john-friedman commented 1 month ago

Sure.