Measurement Levels not writing properly after reading.

Issue #72 new
Former user created an issue

I wrote a script to remove a set of records from an SPSS .sav file. I am reading the file with the following:

with SavReader(filename, idVar='UserID', rawMode=False, ioUtf8=False) as reader: records = reader.all() with SavHeaderReader(filename, ioUtf8=False) as header: metadata= header.dataDictionary()

Then writing the file:

with SavWriter(mod_filename, **metadata) as writer: for record in records: if not removal_list.contains(record[0]): writer.writerow(record)

I get the error: SPSSIOError: Problem setting variable mesasurement level: 'T1v753' [SPSS_INVALID_MEASURELEVEL]

I've verified the the measurelevel for the given T1v753 is valid (b'ratio'). Any ideas on how to fix this problem?

Comments (0)

  1. Log in to comment