I tried to use pickle module in Python 2.4 library to store dictionary to a file for a data storage. However, I got problem when I read it back my pickle. I got the error message from the CPX.
Traceback (most recent call last):
File “./threading.py”, line 442, in __bootstrap
File “src\devices\abc.py”, line 327, in run
File “src\devices\abc.py”, line 249, in read_log
File “C:\Python24\Lib\pickle.py”, line 1390, in load
File “C:\Python24\Lib\pickle.py”, line 872, in load
File “C:\Python24\Lib\pickle.py”, line 985, in load_string
LookupError: unknown encoding: string-escape
I know that the default make.py doesn’t include the pickle.py and encodings\string_escape.py. So, I modified the make.py to complie these two files into dia.zip.
ALWAYS_ADD = (
os.path.join(PYTHON_LIB, “encodings/ascii.py”),
os.path.join(PYTHON_LIB, “encodings/utf_8.py”),
os.path.join(PYTHON_LIB, “encodings/string_escape.py”),
os.path.join(PYTHON_LIB, “pickle.py”),
“src/channels”,
“src/devices”,
“src/presentations”,
)
However, I still found a lookup problem “LookupError: unknown encoding: string-escape”. Could you tell me what the problem is?
Thanks