ropensci / qualtRics

Download ⬇️ Qualtrics survey data directly into R!
https://docs.ropensci.org/qualtRics
Other
215 stars 70 forks source link

error using getSurvey on an EX survey #83

Closed lunerenne closed 5 years ago

lunerenne commented 6 years ago

I've been using getSurvey successfully for awhile on Research Core surveys, but for some reason it's not working for me on the survey for my EX project. What's weird is that I'm both getting a 404 error and also a warning that I have duplicated column names - which I don't know how I'd get the latter error if it was a true 404. Any ideas? ETA I did also call Qualtrics Support and they both confirmed my survey ID and also confirmed that the API call worked fine on that survey ID from their end.

Error in qualtRicsResponseCodes(res) : 
  Qualtrics API complains that the requested resource cannot be found (404 error). Please check if you are using the correct survey ID.
In addition: Warning message:
Duplicated column names deduplicated: 'Q11' => 'Q11_1' [30], 'Q12' => 'Q12_1' [32], 'Q13' => 'Q13_1' [33]
juliasilge commented 5 years ago

Hello there @lunerenne! I am the new maintainer of this package. I know it's been a while but I have some debugging ideas, if you are still having trouble.

root_url <- qualtRics:::append_root_url(Sys.getenv("QUALTRICS_BASE_URL"), "responseexports")
raw_payload <- qualtRics:::create_raw_payload(surveyID = "<YOUR_ID_HERE>",
                                              useLabels = TRUE,
                                              lastResponseId = NULL,
                                              startDate = NULL,
                                              endDate = NULL,
                                              seenUnansweredRecode = NULL,
                                              limit = NULL,
                                              useLocalTime = FALSE,
                                              includedQuestionIds = NULL)

res <- qualtRics:::qualtrics_api_request("POST", url = root_url, body = raw_payload)

Can you try out using some of the internal functions from this package that build the API request and tell me which part is failing? What is the output of these steps?

juliasilge commented 5 years ago

Let me know if you run into this again @lunerenne! We can reopen and debug.