Tuesday, August 19, 2008

Strange scipy.weave import error

Today, I've booted my PC and tried to run a script which uses scipy.weave package. What I got was a rather unusual error:
EOFError: EOF read where object expected

I've tried to type
import scipy.weave
which just reproduced the error. After some thinking I got an idea that some files were broken. A scipy reinstall however warned that some files are broken and cannot be (re)written. So I run the scandisk/chkdsk/whatever its name currently is. It did find some errors within files mentioned in the error message. Nonetheless the import still didn't work, this time replying with another error:
ValueError: bad marshal data

After this I tried repairing both scipy and Python installations to no success. No warnings this time though.
Finally, I uninstalled Python alltogether and deleted all files and directories within C:\Python25\. After installing everything back everything seems to fine allright. I think it is the first such error since I've started using NTFS as my filesystem some five or six years ago.

No comments: