Skip to content
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

methods library not loaded #11

Closed
HarlanH opened this issue Jul 6, 2012 · 2 comments
Closed

methods library not loaded #11

HarlanH opened this issue Jul 6, 2012 · 2 comments

Comments

@HarlanH
Copy link

HarlanH commented Jul 6, 2012

A script I've written using httr works fine interactively, but dies with the following error when run via Rscript:

Error in getCurlHandle(cookiefile = cookie_path, .defaults = list()) :
  could not find function "getClass"
Calls: POST ... handle_url -> find_handle -> handle -> getCurlHandle -> .Call

The workaround is to add library(methods) to the user code. Presumably httr should do that...

@hadley
Copy link
Member

hadley commented Jul 6, 2012

Actually, I think that's a RCurl bug (I don't think httr uses methods anywhere). And really it's an R CMD check bug that this doesn't get picked up automatically.

@hadley hadley closed this as completed Jul 6, 2012
@holgerbrandl
Copy link

Similar problem for me. When I try to source a https link using source_url (from the devtools package) I'll get the following error when using Rscript (via R it runs fine):
Error in getCurlHandle(cookiefile = cookie_path, .defaults = list()) :
could not find function "getClass"
Calls: source_url ... handle_url -> find_handle -> handle -> getCurlHandle -> .Call

However, I've discovered that the problem disappears if I add
library(RCurl)
before calling source_url.

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

No branches or pull requests

3 participants