Hello!
I am trying to import .psydat files for analysis but have a UnicodeDecodeError.
On this forum, I have read about this topic several times, and the fromFile code seems to have already been fixed to accommodate earlier versions of Psychopy.
However, I am still running into this issue: “UnicodeDecodeError : ‘ascii’ codec can’t decode byte 0xb0 in position 1: ordinal not in range(128)”
Specific error occurs on line 55:
53 contents = pickle.load(f) 54 except UnicodeDecodeError: 55 f.seek(0) # reset to start of file to try again 56 contents = pickle.load(f, encoding='latin1') # python 2 data files 57 # if loading an experiment file make sure we don't save further
I am using I am using Psychopy3 (v2020.1.3), on a Windows 10 machine.
—Editing here to add all of the attempts at debugging:
Original:
fpath = ‘G:/My Drive/Name/practice.psydat’
psydata = fromFile(fpath)
What I’ve tried (and didn’t work):
–Replaced ‘/’ with ‘//’ or backslash.
–changed single quotes to double quotes
–put an ‘r’ in front of path name to convert to raw string
–changed line 55 to f.seek(1)
–changed to a different drive name on my computer, in case somehow that was messing up my file name
Does anyone have any suggestions? Thank you so much.