spssDateTime AttributeError: 'bytes' object has no attribute 'sysmis'

Issue #80 new
Former user created an issue

Im trying this code but it doesnt work:

spssDateValue = rw.SavWriter.spssDateTime(b'2001-12-08', '%Y-%m-%d') print (spssDateValue)

I get this error:

Traceback (most recent call last): File "D:\Python37\lib\site-packages\savReaderWriter\savWriter.py", line 319, i n spssDateTime datetimeStr = datetimeStr.decode("utf-8") AttributeError: 'str' object has no attribute 'decode'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "readsav.py", line 10, in <module> spssDateValue = rw.SavWriter.spssDateTime(b"2001-12-08", "%Y-%m-%d") File "D:\Python37\lib\site-packages\savReaderWriter\savWriter.py", line 322, i n spssDateTime return self.sysmis AttributeError: 'bytes' object has no attribute 'sysmis'

Comments (0)

  1. Log in to comment