Inquiry Regarding Compatibility Issue with Reading SPSS Version 25 Files #260
-
Dear all, Thank you in advance for any insights or assistance provided. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, thanks for the report. I think it should not be the case that older versions are not read. So the explanation can be:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the example files. I opened them in a hex editor (you can try yourself in hexed.it) and the files look different. The bycopy one says in the header that it was created in SPSS 25, while the csv one says that it was created in SPSS 22. So it is not clear to me if the problem is that pyreadstat cannot read files from SPSS 22 or not as you initially proposed. I also opened them in SPSS, and It also looks like the csv one is not in UTF-8 but in some chinese local encoding. In SPSS 26, a file generated by coping pasting or generated by csv import both are fine to read. So not sure what is going on here. The file can be opened in PSPP suggesting that it should be possible to read it. I would suggest that you try with a simpler file without chinese characters first (for example in the folder https://github.com/Roche/pyreadstat/tree/master/test_data/basic, there is sample.csv and sample.sav) trying both to import the csv and copying pasting in SPSS 22 to see if that generates an issue. If not, then try to add some chinese characters to see if that makes a difference. Also try to define the encoding as UTF-8 maybe? That already would point at some workarounds, and then you can also open an issue in Readstat for them to fix it (will take long probably). |
Beta Was this translation helpful? Give feedback.
Thanks for the example files. I opened them in a hex editor (you can try yourself in hexed.it) and the files look different. The bycopy one says in the header that it was created in SPSS 25, while the csv one says that it was created in SPSS 22. So it is not clear to me if the problem is that pyreadstat cannot read files from SPSS 22 or not as you initially proposed. I also opened them in SPSS, and It also looks like the csv one is not in UTF-8 but in some chinese local encoding. In SPSS 26, a file generated by coping pasting or generated by csv import both are fine to read. So not sure what is going on here. The file can be opened in PSPP suggesting that it should be possible to read it.
I…