You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.
Receiving a "No such file or directory" error when calling basic rtweet functions.
(By 'basic' I mean common introductory rtweet functions, no fancy parameter values, not requiring data loading...)
This error is different to Issues 202, 413, 421, and 424, which received a "Permission denied" error.
Expected behavior
search_tweets() function should return tweets as per rtweet: Collecting Twitter Data. create_token() function should set token as per vignette("auth", package = "rtweet").
Details
Tested rtweet functions in March, running fine on my system (Windows 10, R 4.0.4, rtweet 0.7.0). Encountered this issue around two weeks ago, without having changed my system. Now upgraded to R 4.0.5, reinstalled rtweet, still having the same issue.
The error message mentions it cannot find "\\staff1.rds". My humble suspicion is that it could have to do with rtweet navigating to a network folder. My Windows default folders such as Desktop, Documents, ... are under \\staff.ad.xxx.edu.au\ud\fr\xxx\Desktop. There is no "\\staff1" folder.
Working directory is set to a non-network location, and R is also installed in a non-network location.
Interestingly, collecting tweets with the vosonSML package, which wraps the search_tweets() function, does not give any errors.
Sincere apologies if this has been addressed already or is not encountered by anyone else in the community.
Requesting token on behalf of user...
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
Error in gzfile(file, mode) : cannot open the connection
In addition: Warning message:
In gzfile(file, mode) :
cannot open compressed file '\\staff1.rds', probable reason 'No such file or directory'
Error in file(file, mode) : cannot open the connection
In addition: Warning message:
In file(file, mode) :
cannot open file '\\staff1.rds': No such file or directory
The documentation of search_tweets that you should look up is for rtweet 0.7.0 with ?search_tweets. The documentation on the website corresponds to the development version (0.7.0.9000) and there have been a lot of changes.
I'm a bit surprised by rtweet looking for a file called staff1.rds. Could you paste the output of traceback() after encountering this error? Also report the traceback() after creating the token too please.
Thank you, llrs. I've updated the issue description with the output of traceback() for both scenarios. I notice that the error occurs after saving a file with saveRDS() and then trying to access it with gzfile(file, mode)/file(file, mode).
Thanks. I expected something different.
I don't know why you are encountering this. On version 0.7.0 it saved the tokens as ".rtweet_token.rds" not "staff.rds". It shouldn't try to open anything like this. If this is a folder it is very weird because it has a file extension on the name of a folder.
Rereading now that you didn't change anything on the R side I would check with your IT team to see if they can provide further help, because it doesn't look to me like anything rtweet would do.
I'm closing the issue because on the development version the tokens management has been changed to a more usual localization. Even if this is due to rtweet it shouldn't happen again from now on.
Updated to include result of
traceback()
belowProblem
Receiving a "No such file or directory" error when calling basic rtweet functions.
(By 'basic' I mean common introductory rtweet functions, no fancy parameter values, not requiring data loading...)
This error is different to Issues 202, 413, 421, and 424, which received a "Permission denied" error.
Expected behavior
search_tweets()
function should return tweets as per rtweet: Collecting Twitter Data.create_token()
function should set token as pervignette("auth", package = "rtweet")
.Details
Tested rtweet functions in March, running fine on my system (Windows 10, R 4.0.4, rtweet 0.7.0). Encountered this issue around two weeks ago, without having changed my system. Now upgraded to R 4.0.5, reinstalled rtweet, still having the same issue.
The error message mentions it cannot find "\\staff1.rds". My humble suspicion is that it could have to do with rtweet navigating to a network folder. My Windows default folders such as Desktop, Documents, ... are under \\staff.ad.xxx.edu.au\ud\fr\xxx\Desktop. There is no "\\staff1" folder.
Working directory is set to a non-network location, and R is also installed in a non-network location.
Interestingly, collecting tweets with the vosonSML package, which wraps the
search_tweets()
function, does not give any errors.Sincere apologies if this has been addressed already or is not encountered by anyone else in the community.
Reproduce the problem
rtweet version
0.7.0
Session info
The text was updated successfully, but these errors were encountered: