[Spambayes] Strange message

Tim Peters tim.one at comcast.net
Fri May 16 14:13:42 EDT 2003


[Mark Hammond]
> Nope - but my main drive is E: - and the .pyc/o files in the
> installer have a full reference to that path.  Python is probably
> looking for the .py associated with that file.  This is most
> noticable in tracebacks from the binary - all have the full path
> from my machine ("E:\src\spambayes, E:\src\python-cvs, etc)

A photon trickles forth from the darkness!  A .pyc file holds the path to
the file it was compiled from, and when opening a .pyc Python looks for the
original .py file to see whether the .pyc file is out of date.  Python
doesn't object if the .py file can't be found (it has the .pyc -- it's not
stuck), but this "no disk" box could be an unwanted Windows-specific
side-effect of merely doing a stat() call on the .py file.

> And given "\Device\Harddisk1\DR3", my money is on that!  I'm not sure
> what the options are here - but at least we do have the source to Python
> <wink>

If the hypothesized scenario is correct, I'd call it a Python buglet in
Windows.

A solution before changing Python would be not to ship .pyc files (let
Python generate them as needed on the client machine, and then they'll have
correct paths -- sometimes <wink>).  The installers I ship for Python and
ZODB don't include any .pyc, .pyw, or .pyo files, so it may not be a
coincidence that I've never heard of this kind of glitch before.

> Jon - can you confirm E: is your removable device?

I'll let Jon answer that one <wink>.




More information about the Spambayes mailing list