0

I updated to SPSS 23 and I can't get the case-control matching to work. With code:

GET
  FILE='\\Rmc-data1\infection-diseases\יעקב\Acinetobacter TMP-SMX\RESP-5.sAV'.
DATASET NAME DataSet1 WINDOW=FRONT.
FUZZY BY=AGE CharlsonScore Department CultureSource SUPPLIERID=ID NEWDEMANDERIDVARS=MatchID
    GROUP=RESP FUZZ=5 1 0 0 EXACTPRIORITY=FALSE
MATCHGROUPVAR=MGV
/OPTIONS SAMPLEWITHREPLACEMENT=FALSE MINIMIZEMEMORY=TRUE SHUFFLE=FALSE.

I get:

Traceback (most recent call last):
  File "<string>", line 36, in <module>
  File "C:\Documents and Settings\All Users\Application Data\IBM\SPSS\Statistics\23\extensions\FUZZY.py", line 256, in Run
    processcmd(oobj, args, casecontrol, vardict=spssaux.VariableDict())
  File "C:\PROGRA~1\IBM\SPSS\STATIS~1\23\Python\Lib\site-packages\extension.py", line 398, in processcmd
    msg = ",".join([unicodeit(item, myenc) for item in msg])
  File "C:\PROGRA~1\IBM\SPSS\STATIS~1\23\Python\Lib\site-packages\extension.py", line 414, in unicodeit
    return unicode(str(value), myenc)
  File "C:\Program Files\IBM\SPSS\Statistics\23\Python\lib\encodings\cp1255.py", line 15, in decode
    return codecs.charmap_decode(input,errors,decoding_table)
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9c in position 28: character maps to <undefined>

I understand that the unicode error may have to do with the python encoding (e.g. UTF-8 instead of cp1255) but I don't know how to change the encoding within the SPSS environment. Any ideas?

Netwave
  • 40,134
  • 6
  • 50
  • 93
Yaakov
  • 1
  • 2

1 Answers1

1

It appears that you are running in code page mode with your code page set to 1255 (Hebrew). In that code page, the code 9c is not a valid character, so, of course, it can't be converted to Unicode. Something is probably wrong with the original data read.

Try putting Statistics in Unicode mode (SET UNICODE on or via Edit > Options) and reading the data. If the data are not in cp1255, you will need to set the Statistics locale properly in order to read the data.

HTH, Jon Peck

JKP
  • 5,419
  • 13
  • 5