Closed pgmj closed 2 months ago
We did make some changes to how the temp directory is found/handled in the 3.2.1 release, as outlined in #349 and the issues linked there. It has solved that whole class of bugs but sounds like you are running into a related problem.
Can you share a reprex like this of your failing call to fetch_survey()
?
library(qualtRics)
res <- fetch_survey("SV_8333HU7pajrPy0C")
#> | | | 0% | |======================================================================| 100%
#>
#> ── Column specification ────────────────────────────────────────────────────────
#> cols(
#> .default = col_character(),
#> StartDate = col_datetime(format = ""),
#> EndDate = col_datetime(format = ""),
#> Progress = col_double(),
#> `Duration (in seconds)` = col_double(),
#> Finished = col_logical(),
#> RecordedDate = col_datetime(format = ""),
#> SolutionRevision = col_double(),
#> OverallBenefits_DO_OB4 = col_double(),
#> OverallBenefits_DO_OB1 = col_double(),
#> OverallBenefits_DO_OB2 = col_double(),
#> OverallBenefits_DO_OB3 = col_double(),
#> WorkplaceBenefits_DO_WB2 = col_double(),
#> WorkplaceBenefits_DO_WB1 = col_double()
#> )
#> ℹ Use `spec()` for the full column specifications.
dplyr::glimpse(res)
#> Rows: 26
#> Columns: 28
#> $ StartDate <dttm> 2024-07-30 11:10:31, 2024-07-30 11:10:31, 20…
#> $ EndDate <dttm> 2024-07-30 11:10:31, 2024-07-30 11:10:31, 20…
#> $ Status <chr> "Survey Test", "Survey Test", "Survey Test", …
#> $ Progress <dbl> 100, 100, 100, 100, 100, 100, 100, 100, 100, …
#> $ `Duration (in seconds)` <dbl> 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, …
#> $ Finished <lgl> TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRU…
#> $ RecordedDate <dttm> 2024-07-30 11:10:31, 2024-07-30 11:10:31, 20…
#> $ ResponseId <chr> "R_57Peg8bMlfbnU90", "R_09tMxb83zFWJnMi", "R_…
#> $ DistributionChannel <chr> "test", "test", "test", "test", "test", "test…
#> $ UserLanguage <chr> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, N…
#> $ OB1 <ord> Strongly disagree, Slightly disagree, Slightl…
#> $ OB2 <ord> Strongly disagree, Slightly agree, Slightly d…
#> $ OB3 <ord> Strongly agree, Slightly disagree, Slightly d…
#> $ OB4 <ord> Strongly agree, Neutral, Slightly agree, Slig…
#> $ WB1 <ord> Very dissatisfied, Very dissatisfied, Very sa…
#> $ WB2 <ord> Slightly satisfied, NA, Very satisfied, Very …
#> $ Q14 <chr> "Posuere interdum tempor scelerisque sed mole…
#> $ Q10 <ord> Prefer not to say, Female, Male, Female, Pref…
#> $ Q11 <chr> "Over 80", "Under 21", "31 to 40", "51 to 60"…
#> $ SolutionRevision <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, …
#> $ ProjectCategory <chr> "EX", "EX", "EX", "EX", "EX", "EX", "EX", "EX…
#> $ ProjectType <chr> "BenefitsPerks", "BenefitsPerks", "BenefitsPe…
#> $ OverallBenefits_DO_OB4 <dbl> 2, 1, 3, 4, 3, 1, 4, 3, 1, 1, 1, 3, 1, 1, 3, …
#> $ OverallBenefits_DO_OB1 <dbl> 3, 2, 4, 1, 2, 2, 3, 4, 3, 4, 2, 2, 3, 3, 2, …
#> $ OverallBenefits_DO_OB2 <dbl> 4, 4, 1, 3, 1, 4, 1, 1, 2, 2, 3, 1, 4, 4, 1, …
#> $ OverallBenefits_DO_OB3 <dbl> 1, 3, 2, 2, 4, 3, 2, 2, 4, 3, 4, 4, 2, 2, 4, …
#> $ WorkplaceBenefits_DO_WB2 <dbl> 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, …
#> $ WorkplaceBenefits_DO_WB1 <dbl> 1, 2, 2, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, …
Created on 2024-09-02 with reprex v2.1.1
It should show the full traceback, which will be helpful. Also, if you can do reprex::reprex(session_info = TRUE)
that may be helpful in this situation.
Thanks! This is all output I get:
> mysurvey <- fetch_survey(surveyID = q$id[2])
|==========================================================================================================================================================| 100%
Error: '/var/folders/yf/q87d8g990l5f_sz039gjgmy80000gn/T/RtmpWCl3wO/Att leda på avstånd.csv' does not exist.
The name of the .csv file is the full name of the survey in the Qualtrics system.
reprex::reprex(session_info = TRUE)
#> ℹ Non-interactive session, setting `html_preview = FALSE`.
#> CLIPR_ALLOW has not been set, so clipr will not run interactively
#> Error in switch(where, expr = stringify_expression(x_expr), clipboard = ingest_clipboard(), : EXPR must be a length 1 vector
Created on 2024-09-03 with reprex v2.1.1
Ah, thanks for sharing the real filename you have there! I changed the name of this survey and can reproduce the problem:
library(qualtRics)
res <- fetch_survey("SV_8333HU7pajrPy0C")
#> | | | 0% | |======================================================================| 100%
#> Error: '/var/folders/hv/hzsmmyk9393_m7q3nscx1slc0000gn/T/RtmpjRnn5G/new: sůrvey! åbõut? ~benefits~.csv' does not exist.
Created on 2024-09-04 with reprex v2.1.1
Package version 3.2.0 works perfectly for retrieving data, but 3.2.1 fails with identical code with this error message:
I have tried to change the tmpdir, but get the same error. Downgraded to 3.2.0 and things work again, in the same R session.