jadchaar / sec-edgar-downloader

📈 Download filings from the SEC EDGAR database using Python
https://sec-edgar-downloader.readthedocs.io
MIT License
491 stars 137 forks source link

HTTPError: 500 Internal Server Error #103

Closed alexdinisor98 closed 11 months ago

alexdinisor98 commented 2 years ago

Hello Jad,

I encountered this issue, when trying to run the .get function for 10-K filings, searching by CIK, in a loop with 7k steps, as follows: After the 10-15th iteration it throws this error "HTTPError: 500 Server Error: Internal Server Error for url: https://efts.sec.gov/LATEST/search-index". Is there a way to address this issue? I even tried with a time.sleep() of 10 seconds, but it leads to the same error.

Thanks in advance, Alexandra

JJery-web commented 2 years ago

Yes I also meet the same question.

scrappyreed commented 2 years ago

Try something like this:

while(True): try:
nrep=dl.get(filing_type,cik,before,after,query) break except: print("Exception - sleeping 60 seconds") time.sleep(60) del dl dl=Downloader(data_dir)

jadchaar commented 11 months ago

Hi folks is this issue still being seen on the latest version of the package? Please re-open this issue if it is still re-occurring.