EOFError in python win32com
Asked Answered
E

2

6

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?

Esmaria answered 4/10, 2016 at 14:33 Comment(2)
So you have deleted C:\Python27\Lib\site-packages\win32com\gen_py\dicts.dat and still get the problem?Viscid
@Viscid yes, I did delete the dicts.dat file. Well actually the folder name on my path is ...\win32com\_gen_py_\dicts.dat, and I try to remove all the contents under that folder, but it didn't work.Esmaria
N
6

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.

Nighthawk answered 25/1, 2019 at 22:2 Comment(0)
D
-1

I think uninstalling the package using CMD(Administrator) using

pip uninstall pywin32

and again installing it by collecting new data using no saved cache using

pip --no-cache install pywin32

will help you a lot

Dasie answered 31/5, 2018 at 16:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.