bws0013 / read_13f

Read 13f filings and present them in a useful form such as a database.
https://www.sec.gov/edgar/searchedgar/companysearch.html
Apache License 2.0
33 stars 10 forks source link

Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "arr" is null #15

Open rtg20 opened 1 year ago

rtg20 commented 1 year ago

Hi, I get the following error when trying to download the 13F into a CSV for CIK=1263508 . I already made the folder for the CSV.

Any ideas? thanks.

org.jsoup.HttpStatusException: HTTP error fetching URL. Status=403, URL=https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=1263508&type=13f&dateb=&owner=include&count=10 at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:760) at org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:706) at org.jsoup.helper.HttpConnection.execute(HttpConnection.java:299) at org.jsoup.helper.HttpConnection.get(HttpConnection.java:288) at com.ben.smith.reader.Web_Scraper.getAllPageLinks(Web_Scraper.java:116) at com.ben.smith.reader.Web_Scraper.createFinDocs(Web_Scraper.java:64) at com.ben.smith.reader.Main.pass_data(Main.java:158) at com.ben.smith.reader.Main.menu(Main.java:76) at com.ben.smith.reader.Main.main(Main.java:27) Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "arr" is null at com.ben.smith.reader.Web_Scraper.createFinDocs(Web_Scraper.java:68) at com.ben.smith.reader.Main.pass_data(Main.java:158) at com.ben.smith.reader.Main.menu(Main.java:76) at com.ben.smith.reader.Main.main(Main.java:27)

bws0013 commented 1 year ago

Are you always getting this error or just sometimes?

If it's only sometimes then it's possible there is some kind of request blocking occurring. I include a default delay between requests, but maybe it's not long enough.

If it's all the time, then it's possible that all requests are being blocked, or yours specifically. I can't really tell, but does going to the URL [1] included in your comment work for you, or are you also getting an error?

[1] https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=1263508&type=13f&dateb=&owner=include&count=10

rtg20 commented 1 year ago

Thanks for your message. I believe the issue is a user agent error.

https://www.sec.gov/os/accessing-edgar-data

Should be an easy fix if you have time.

Thanks!

On Mon, Sep 4, 2023, 11:56 AM Ben Smith @.***> wrote:

Are you always getting this error or just sometimes?

If it's only sometimes then it's possible there is some kind of request blocking occurring. I include a default delay between requests, but maybe it's not long enough.

If it's all the time, then it's possible that all requests are being blocked, or yours specifically. I can't really tell, but does going to the URL [1] included in your comment work for you, or are you also getting an error?

[1] https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=1263508&type=13f&dateb=&owner=include&count=10

— Reply to this email directly, view it on GitHub https://github.com/bws0013/read_13f/issues/15#issuecomment-1705621683, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZJAKRWOG2JY7J5LYE3FGTXYYP5RANCNFSM6AAAAAA4GQ4Z4M . You are receiving this because you authored the thread.Message ID: @.***>