Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only can get the first data when to get other 13F info #218

Open
hwypengsir opened this issue Feb 6, 2025 · 2 comments
Open

Only can get the first data when to get other 13F info #218

hwypengsir opened this issue Feb 6, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@hwypengsir
Copy link

I want to get 13F form info:

from edgar import *
filings = get_filings(form="13F-HR")
len(filings)
3386

Now get the first company's stock portfolio:

filings[0].obj().infotable
                    Issuer                  Class      Cusip     Value SharesPrnAmount    Type PutCall InvestmentDiscretion  SoleVoting  SharedVoting  NonVoting Ticker
0   PIMCO CALIF MUN INCOME  MF Closed and MF Open  72200M108    112735           19708  Shares                         SOLE           0             0      19708    PCK
1              EXXON MOBIL           Common Stock  30231G102    213887            1988  Shares                         SOLE           0             0       1988    XOM
2               NUVEEN ESG  MF Closed and MF Open  67092P409    215487            4548  Shares                         SOLE           0             0       4548   NUMG
3              DUKE ENERGY           Common Stock  26441C204    221389            2054  Shares                         SOLE           0             0       2054    DUK
4         INVESCO EXCHANGE  MF Closed and MF Open  46137V241    222674            3322  Shares                         SOLE           0             0       3322   SPHQ
..                     ...                    ...        ...       ...             ...     ...     ...                  ...         ...           ...        ...    ...
64          SPDR PORTFOLIO  MF Closed and MF Open  78463X889  12628639          370015  Shares                         SOLE         112             0     370015   SPDW
65          SPDR PORTFOLIO  MF Closed and MF Open  78464A854  14679845          212936  Shares                         SOLE           0             0     212936   SPLG
66          SPDR PORTFOLIO  MF Closed and MF Open  78464A805  19799792          277191  Shares                         SOLE           0             0     277191   SPTM
67          SPDR PORTFOLIO  MF Closed and MF Open  78464A409  23672869          269315  Shares                         SOLE         102             0     269315   SPYG
68          SPDR PORTFOLIO  MF Closed and MF Open  78468R853  23934248          532819  Shares                         SOLE         181             0     532819   SPSM

[69 rows x 12 columns]

Try to get the second:

ilings[1].obj().infotable
Filing 0000919192-25-000003 not found in local storage. Downloading from SEC ...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/debian/strange/lib/python3.11/site-packages/edgar/_filings.py", line 1483, in obj
    return self.data_object()
           ^^^^^^^^^^^^^^^^^^
  File "/home/debian/strange/lib/python3.11/site-packages/edgar/_filings.py", line 1479, in data_object
    return obj(self)
           ^^^^^^^^^
  File "/home/debian/strange/lib/python3.11/site-packages/edgar/__init__.py", line 141, in obj
    return ThirteenF(sec_filing)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/debian/strange/lib/python3.11/site-packages/edgar/thirteenf.py", line 93, in __init__
    self._related_filings = filing.related_filings().filter(filing_date=filing.filing_date, form=filing.form)
                            ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/debian/strange/lib/python3.11/site-packages/edgar/_filings.py", line 1590, in related_filings
    from edgar import download_entity_submissions_from_sec, parse_entity_submissions
ImportError: cannot import name 'download_entity_submissions_from_sec' from 'edgar' (/home/debian/strange/lib/python3.11/site-packages/edgar/__init__.py)

How to fix it?

@dgunning dgunning added the bug Something isn't working label Feb 6, 2025
@dgunning
Copy link
Owner

dgunning commented Feb 6, 2025

Looking into this

@dgunning
Copy link
Owner

dgunning commented Feb 6, 2025

Found the issue. Will be fixed later and released by the weekend.

This happens when use_local_storage is turned on so the workaround is to turn it off.

Sorry about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants