import site fails - Please Help

swapnil swapnil.st at gmail.com
Wed Nov 17 03:53:56 EST 2010


On Nov 15, 1:46 pm, Helmut Jarausch <jarau... at igpm.rwth-aachen.de>
wrote:
> Hi, I'm completely puzzled and I hope someone
> can shed some light on it.
>
> After cloning a running system, booting the new machine from a rescue CD,
> chroot to the new root partition, I get the following strange error
> from python upon startup
>
> python -v> import site failed
>
> ....
> st= os.stat(path)
> stat() argument 1 must be encoded string without NULL bytes, not str
>
> So, what's broken? How can I get out what 'path' contained at this
> moment?
>
> Many thanks for your help,
> Helmut.

Perhaps its not able to locate the libraries. Try using
http://docs.python.org/using/cmdline.html#envvar-PYTHONPATH and
http://docs.python.org/using/cmdline.html#envvar-PYTHONHOME



More information about the Python-list mailing list