Export to SPSS: save failed a provided name contains an ille

Discuss the jamovi platform, possible improvements, etc.

by pdeli » Wed Jan 20, 2021 3:25 pm


I wanted to export a Jamovi database to SPSS (.sav file). However, when I tried to do so, I got a quickly disappearing message saying "save failed a provided name contains an illegal character" (this also occurred to .sas7bdat, .xpt, and .dta files).

Changing the filename did not solve the issue. Exporting as .RData worked, however.

Thanks to a stackoverflow post (1) I then proceeded to export the data from R/RStudio which basically gave me the same answer, namely: "Error in write_sav_(data, normalizePath(path, mustWork = FALSE), compress = compress) : Writing failure: A provided name contains an illegal character."

Further research led me to yet another stackoverflow post (2) that made me realise that by "name", the error message meant "variable name". I noticed that one variable name had a * (star) character which I changed for an X and 3 other variable names that had a - (minus) character that I promptly removed.

After that export went as a breeze (but only for .sav / SPSS files, it did not work for .sas7bdat, .xpt, and .dta files; that is why I did not dare answer to the "Error exporting the data as SPSS or dta" post (3)).

Hope this will help someone.


FWIW the system used:
  • macOS Catalina version 10.15.7 (19H114)
  • Jamovi version

(1) https://stackoverflow.com/a/40108953
(2) https://stackoverflow.com/q/62519260/2950721
(3) https://forum.jamovi.org/viewtopic.php?f=6&t=1405

Posts: 18
Joined: Thu Mar 19, 2020 3:05 pm

Return to General