I am getting this error, and I dont know what it means. How can I fix this problem?
my code looks like this, I've used it before and it has worked:
parentdir = os.getcwd()
dirlist = os.listdir(parentdir)
for dir in dirlist:
if not dir == "pubs_edits": continue
if os.path.isdir(os.path.join(parentdir, dir)):
os.chdir(os.path.join(parentdir, dir))
file_list = os.listdir(os.path.join(parentdir, dir))
for f in file_list:
in1 = open(f, 'r')
dict2 = pickle.load(in1)
This is the error message:
File "/home/md202/pmid_editor.py", line 18, in <module>
dict2 = pickle.load(in1)
File "/usr/lib/python2.5/pickle.py", line 1370, in load
return Unpickler(file).load()
File "/usr/lib/python2.5/pickle.py", line 858, in load
dispatch[key](self)
KeyError: '\x00'