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

do.call error #9

Closed
aniruhil opened this issue Dec 17, 2016 · 2 comments
Closed

do.call error #9

aniruhil opened this issue Dec 17, 2016 · 2 comments
Assignees

Comments

@aniruhil
Copy link

registerApiKey("mytoken")
[1] TRUE

surveys <- getSurveys(root_url="https://ohio.qualtrics.com")
Error in do.call(rbind.data.frame, content(res)$result$elements) :
second argument must be a list

Any idea what could be going on here, Jasper?

@JasperHG90 JasperHG90 self-assigned this Dec 17, 2016
@JasperHG90
Copy link
Collaborator

JasperHG90 commented Dec 17, 2016

Hi Ani,

Thanks for the report.

getSurveys() queries the API, which then returns a list of survey IDs and other information.

do.call() recursively applies rbind.data.frame() to this list such that the function returns a data frame with survey information.

This error means that the second argument passed to do.call() (in this case, the list of survey information) is not a list. Most likely, its value is NULL. This happens because the Qualtrics API does not return a list of surveys for some reason, for example because your authentication with the API fails.

Please check the following:

  1. You have access to the Qualtrics API and you have a valid API key
  2. You have passed a valid API key to registerApiKey()
  3. Please re-run this function without a specific root url and check the results.

I will update the error message such that it is more informative.

Thanks!

@aniruhil
Copy link
Author

Thanks Jasper; might be something to do with access rights at my institution since using qualtrics' API documentation page to test my API token throws a 401 error.

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

2 participants