Page 1 of 1

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

Posted: Wed Jan 20, 2021 3:25 pm
by pdeli
Hello,

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.

Cheers,
pdeli

FWIW the system used:
  • macOS Catalina version 10.15.7 (19H114)
  • Jamovi version 1.6.12.0
(1) https://stackoverflow.com/a/40108953
(2) https://stackoverflow.com/q/62519260/2950721
(3) viewtopic.php?f=6&t=1405

++++

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

Posted: Tue Apr 20, 2021 8:40 pm
by gimbo
Dear all,
I have the same problem

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

Posted: Wed Apr 28, 2021 3:16 pm
by AndreaSimpson
Any suggestion?

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

Posted: Wed Apr 28, 2021 11:18 pm
by jonathon
hi,

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.

jonathon

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

Posted: Wed Nov 09, 2022 6:20 pm
by HAP
Thank you for this - that saved my day!!