Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EOFError in python win32com

I am running Sympathy for Data, a program based on python. It worked well until today. I got error message like this:

File "..\Python27\lib\site-packages\win32com\client\__init__.py", line 11, in <module>
import gencache
File >"..\Python27\lib\site-packages\win32com\client\gencache.py", line 662, in <module>
_ _init_ _()
File >"..\Python27\lib\site-packages\win32com\client\gencache.py", line 56, in _ _init_ _
_LoadDicts()
File "..\Python27\lib\site-packages\win32com\client\gencache.py", line 109, in _LoadDicts
version = p.load()
EOFError

I find an answer here which basically had the same issue, but the solution doesn't work for me. All the solutions that I've found online provide the same solution, remove the contents under _gen_py_ folder.

I don't have to run any program with Sympathy for data. I got this error message even if I open the iPython shipped with Sympathy for data.

I am really hopeless in this case, could someone help me how to solve it?

like image 545
NAX Avatar asked Oct 04 '16 14:10

NAX


1 Answers

I had the same problem when I had to reboot the system when it was running a program using win32com. I was using an Py2.7 anaconda environment and couldn't find dicts.dat file in my anaconda folder. I later found that is is actually stored in a temporary directory \AppData\Local\Temp\gen_py\2.7 I deleted that and it solved the error.

like image 99
siby Avatar answered Sep 29 '22 10:09

siby