Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

bomrang currently throwing connection error #136

Closed
TristanLouthRobins opened this issue Mar 28, 2021 · 7 comments
Closed

bomrang currently throwing connection error #136

TristanLouthRobins opened this issue Mar 28, 2021 · 7 comments

Comments

@TristanLouthRobins
Copy link

Session Info
The get_historical_weather() call is currently throwing an error with connecting to BOM's database as below:

Error in file(con, "r") : 
  cannot open the connection to 'http://www.bom.gov.au/climate/data/lists_by_element/alphaAUS_136.txt'
In addition: Warning message:
In file(con, "r") :
  cannot open URL 'http://www.bom.gov.au/climate/data/lists_by_element/alphaAUS_136.txt': HTTP status was '403 Forbidden'
@adamhsparks
Copy link
Collaborator

Thanks for reporting this. We’re aware and this is a duplicate of, #133, which has been fixed in the version that’s ready for submission to CRAN today.

@adamhsparks
Copy link
Collaborator

If you need data in the meantime while we wait on CRAN, this seems to be an RStudio issue, not an R issue per se. You might try run your script in an R session that's not in RStudio.

@TristanLouthRobins
Copy link
Author

My apologies for the duplication, thanks Adam! Not need for data today; it can wait.

Thanks again,

Tristan

@jimjam-slam
Copy link
Contributor

Note that when I encountered this issue (#137), it wasn't in an RStudio session! It was in a regular R session (although running inside Linux using WSL on Windows)

@adamhsparks
Copy link
Collaborator

adamhsparks commented Apr 12, 2021

@Rensa, can you confirm an error 403 forbidden and changing the useragent worked for you?

Also, is it still happening with the latest release?

@jimjam-slam
Copy link
Contributor

jimjam-slam commented Apr 12, 2021

It's still happening to me with the latest release (commit 62233b4, following #134). However, when I run the test request with xml2, I don't have any problems even if I don't change my user agent:

> xml2::read_html("http://www.bom.gov.au")
{html_document}
<html lang="en">
[1] <head>\n<meta http-equiv="Content-Type" content="text/html; charset=UTF-8 ...
[2] <body>\n\n<div id="pageheight">\n\n<div id="pagewrap">\n\n<h1 class="acce ...

My user agent option doesn't appear to be set at all:

> options(HTTPUserAgent)
Error in options(HTTPUserAgent) : object 'HTTPUserAgent' not found

Changing the user agent doesn't solve it :/

@jimjam-slam
Copy link
Contributor

No worries! Re-opening #137.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants