Error In Load the sequel - CSV File will not let me export it

Error in load("/cloud/project/C:\Users\Jack-Ryan\OneDrive\personal\Documents\avg_ride_length.csv") :
bad restore file magic number (file may be corrupted) -- no data loaded
In addition: Warning message:
file ‘C:\Users\Jack-Ryan\OneDrive\personal\Documents\avg_ride_length.csv’ has magic number '"","a'

I'm trying to finish this section of my CS project but I seem to have come across this
error when exporting it, and I've seen other forums that haven't solved my dilemma.

I tried applying backslashes to the code but then I get this error
Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
In addition: Warning message:
In readChar(con, 5L, useBytes = TRUE) :
cannot open compressed file '\cloud\project\C:\Users\Jack-Ryan\OneDrive\personal\Documents\avg_ride_length.csv', probable reason 'No such file or directory'
Any assistance would be much appreaciated

From this I can infer you are using Posit Cloud and trying to directly reference one of your local files, if so, you have to realize that this service provides you with an RStudio session that runs on the cloud, not on your local system, ergo, they do not have access to your local files. You need to upload the csv file to the server first so the R session can have access to it.

1 Like

oh I did upload the original excel files and it transformed through the script I was given for the certificate course I'm taking created by Google. This CSV file I think is supposed to be created in the posit from my understanding

Regardless of how the csv file is created the bottom line is that you can't directly access your local files from Posit Cloud and the file path you are specifying references a location in your local file system. The file needs to be located at the server, there is no other way around that, so you simply need to locate the file in the server by whatever means you feel comfortable with.

1 Like

I am facing the same problem, Pls guid me how do I locate the file on the server of posit cloud.