-
Notifications
You must be signed in to change notification settings - Fork 48
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
Cannot Open URL #17
Comments
Hi author and georgeaj, is this issue resolved? I am having the same issue and trying to figure out why. |
I haven’t tried it in a few days. I was able to get one company’s 2019 data one time. I suspect it could possibly be that the SEC database can’t handle the amount of requests it gets for current data every day and so it returns nothing. If this is the case then there may not be a solution. After having this problem I wrote my own function to pull the data from the SEC’s excel files that are posted with every filing. I may make it into a package if I get the rest of the kinks out. What method does finreportr use to get the data?
… On Jun 26, 2019, at 4:59 PM, dchen728 ***@***.***> wrote:
Hi author and georgeaj, is this issue resolved? I am having the same issue and trying to figure out why.
This is a great package and really helpful to pull annual data. Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
My understanding is that finreportr pulls the data in XML format from SEC and then parse and convert the data into dataframe in R. It would be great if you could make your function into a package since there are very few ways currently available to pull SEC data into R. |
My understanding is that finreportr pulls the data in XML format from SEC and then parse and convert the data into dataframe in R. It would be great if you could make your function into a package since there are very few ways currently available to pull SEC data into R. |
A brief update: From what I'm seeing, the underlying issue appears to be due to something about the way the XBRL package interfaces with EDGAR. When finreportr pulls and parses XBRL-format data from the U.S. Securities and Exchange Commission, it calls the XBRL package function For example, if you try to run: ## ORCL's 2019 financials
url <- "https://www.sec.gov/Archives/edgar/data/1341439/000156459019023119/orcl-20190531.xml"
## Call xbrlDoAll(), in verbose mode
XBRL::xbrlDoAll(url, cache.dir='XBRLcache',prefix.out="out",verbose=TRUE) The printout you receive is:
This issue appears to affect all packages and applications that use this function in the XBRL package. For example: bergant/finstr#12 I will update when I find out more. Thank you so much for your patience. |
Hey Seward, thanks for the update. Look forward to hearing more updates. I will keep an eye on the XBRL package as well. Thanks again. |
I have written to the author of the XBRL package to see if he can offer some guidance. |
Thanks for the update. |
I am having issues with a company that got delisted with a subsequent symbol change (EPE to EPEG). |
Any luck with this? |
Please see this SO question , might help hack a solution if this is urgent for you. |
I was able to fix the XBRL package with the SO question from above but I ran into another problem where GetFiniancials for a 2019 report year would return the following error: After doing some digging it appears that the descriptions of cash flow statements, balance sheets, and income have changed from previous years. The 2019 report I was looking at (symbol "SM") has the following: CONSOLIDATED BALANCE SHEETS (in thousands, except share data) For example, GetIncome only looks for these column headers:
I made the correction to the descriptions and was able to download the data. Just thought I would pass along. |
I am also working with this package and observed the same behavior. There are however two distinct problems arising at the same time.
XBRL: SEC NAMES:
results in the following error
if I then check if this file is present on the Edgar website: I notice that the file When I then try to find what should be the correct name using the
I get the following URL:
When passing this URL to the revised XBRL package
it downloads the data correctly. CONCLUSION: |
Hello, I am trying to load J.P. Morgan income statement, but I get the following error, could you help me with some solution. Thanks in advance.
|
In the GetFinancial function there is the GetURL function which I believe is the issue. The inst.url string object is created with finishing with the report.period. Apparently now EDGAR has created string endings to the xml file (examples include cal,def,lab,pre) that need to be added in to the inst.url string. I don't know how many suffixes are enumerated. It looks like the @GreenGrassBlueOcean has different string endings on the xml file.
|
Returned: But I knew where the file was so wrote the URL manually (and checked it many times). All good until I got to the Whereupon, same as mentioned before: `..trying URL 'https://www.sec.gov/Archives/edgar/data/1800/000110465920023904/https://xbrl.sec.gov/dei/2019/dei-2019-01-31.xsd' In addition: Warning message: Going to carry on trying to find some answers but any ideas welcome. |
This is an issue with the XBRL library when the Schema URL is HTTPS.
It checks that if the URL doesn't start with "http:" then it starts modifying it. It prepends the file name with the parent directory of the original request:
I'm new to R, but looking into how to recompile the library and force it to use the fixed version of the file. |
Is it possible this is the same issue? Looks I'm getting a "doubled" URL - HTTP status was '404 Not Found' Thanks for your time!
Versioning:
|
Seems like the package doesn't work anymore. for example Trying any number of commands gives In addition: Warning messages: |
Most of the '403 Forbidden' cannot open URL errors are due to SEC EDGAR requiring a user agent authentication. I was able to fix for XBRL package with the following. Insert your own name and email in the string. options(HTTPUserAgent = "yourname [email protected]") |
This worked for me! Thanks @IEORTools |
Here is a possible solution by editing the XBRL source code to fix the URL issue https://stackoverflow.com/questions/53651481/schema-file-does-not-exist-in-xbrl-parse-file |
Thanks, I’ll check it out.
A
… On 13 Nov 2022, at 11:14 am, Larry ***@***.***> wrote:
Here is a possible solution by editing the XBRL source code to fix the URL issue
https://stackoverflow.com/questions/53651481/schema-file-does-not-exist-in-xbrl-parse-file <https://stackoverflow.com/questions/53651481/schema-file-does-not-exist-in-xbrl-parse-file>
—
Reply to this email directly, view it on GitHub <#17 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKMDQ45OLRHF74HPYDWQOSDWIAXHFANCNFSM4HXA74QQ>.
You are receiving this because you commented.
|
No finreportr functions work when year = 2019. Have tested on multiple companies and multiple years, problem is not company specific and only exists when year = 2019.
GetBalanceSheet('GOOG', 2019)
Error in fileFromCache(file) : Error in download.file(file, cached.file, quiet = !verbose) : cannot open URL 'https://www.sec.gov/Archives/edgar/data/1652044/000165204419000004/https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd'
Session Info:
The text was updated successfully, but these errors were encountered: