Problems reading csv from url - RCloud

Hi,
Forgive me, I don't use R normally, but I'm trying to help troubleshoot an issue for a faculty member. I tried searching solutions, but none of the ones presented on the internetz have worked.

I'm having trouble reading a csv from a URL using RStudio Cloud.
I can read the csv from the same URL using RStudio on the desktop just fine -- but it gives me an error using the cloud version.

If you need a project link, I can add one, but I've been using blank/new projects -- so there's nothing special about the setup.

educ_data<-read.csv("https://crooker.faculty.unlv.edu/econ441/data/education_wage_data.csv")

Error in file(file, "rt") : cannot open the connection to '[link above]' In addition: Warning message: In file(file, "rt") : cannot open URL 'https://crooker.faculty.unlv.edu/econ441/data/education_wage_data.csv': HTTP status was '403 Forbidden'

I currently have the site forcing https, which some forums say is not supported -- so I removed the forced https on the site and tried with http, but it still didn't work.
The file permissions are set to world:read (although I have tried changing them to read/execute and it did not change the outcome).

Any ideas as to what could be happening? Why it works in RStudio desktop but not RStudio Cloud?

Thank you!
Pamela

Hi @PamelaG333!

I was able to use curl from the command line to do this from home network, but when I repeated the process from a server within the rstudio.cloud network I was met with the same 403 Forbidden message you are seeing.

To me this suggests that the crooker.faculty.unlv.edu network is rejecting requests from the ec2 network space, or at least specifically, our NAT gateways.

The addresses that we use for outgoing connections can be found here: https://docs.rstudio.com/shinyapps.io/applications.html#firewalls

2 Likes

Ahhh. You aren't the hero I deserve... that did it.

Thank you!
Pamela

hah! I'm glad you got it working!!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.