nlpaueb / edgar-crawler

The only open-source toolkit that can download EDGAR financial reports and extract textual data from specific item sections into nice and clean JSON files.
GNU General Public License v3.0
294 stars 80 forks source link

errno 22 #4

Closed nyssarex closed 2 years ago

nyssarex commented 2 years ago

with open(filepath, 'wb') as f: OSError: [Errno 22] Invalid argument: 'C:\Users\Amir\PycharmProjects\edgar-crawler\datasets\RAW_FILINGS\1020214_10K_1999_https://www.txt'

nyssarex commented 2 years ago

I am using windows+pycharm

eloukas commented 2 years ago

Hi @nyssarex, can you tell me in which line does this error occur? Also, some other users have solved it by replacing ://" with _" in the filename.

I have tested the tool only in a Unix system. I will have a look into it for Windows as well and keep you updated.

nyssarex commented 2 years ago

Hi @eloukas , Yeah I saw this comment, but I didn't get where to replace this and also I have urls in file name you sad it is not correct yes?

nyssarex commented 2 years ago

@eloukas Hi again, I solved this error by this line guys accession_num = accessionnum.replace("://", "") may be need to do test check on windows also, I am not sure this is a right solution

eloukas commented 2 years ago

Hi @nyssarex. Thank you for pointing out the issue. I fixed it and updated the code. Feel free to open any new issue if anything arises.