import site fails - Please Help

swapnil at
Wed Nov 17 09:53:56 CET 2010

On Nov 15, 1:46 pm, Helmut Jarausch <jarau... at>
> 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 and

More information about the Python-list mailing list