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: 21
Joined: Thu Mar 19, 2020 3:05 pm

by gimbo » Tue Apr 20, 2021 8:40 pm

Dear all,
I have the same problem
Posts: 1
Joined: Tue Apr 20, 2021 8:37 pm

by AndreaSimpson » Wed Apr 28, 2021 3:16 pm

Any suggestion?
Posts: 1
Joined: Wed Apr 28, 2021 3:15 pm

by jonathon » Wed Apr 28, 2021 11:18 pm


one of your columns has a name which isn't compatible with those file formats. see if any of your column names make use of special characters or similar.

User avatar
Posts: 1719
Joined: Fri Jan 27, 2017 10:04 am

by piotrekdec » Sat May 01, 2021 2:07 pm

additional condition: the name of the variable must not start with the number
Posts: 4
Joined: Mon Feb 22, 2021 6:22 pm

Return to General