[Pythonmac-SIG] "no codec search functions registered" when /usr/bin/ in PATH

Jack Jansen Jack.Jansen@cwi.nl
Mon, 23 Dec 2002 11:02:23 +0100


On Monday, Dec 23, 2002, at 04:33 Europe/Amsterdam, Ivan Kozik wrote:

> Hello,
>
> Right now I'm using the Python version built by apple (anyone know 
> which one this is?). It almost works great (even executes 
> Resources/__main__.py) in my .app bundle, but the problem is that I 
> get the error message:
> LookupError: no codec search functions registered: can't find encoding
> when I open my program with /usr/bin in the $PATH variable.
> For example: '/usr/bin/open -a ProgramName' does not work, while 
> 'PATH="" /usr/bin/open -a ProgramName' does work.

I haven't the foggiest idea as to what could be happening, but I think 
it must have to do with the sys.path initialisation code. I would start 
debugging with either turning on PYTHONVERBOSE (so you can see where 
modules are imported from) or PYTHONINSPECT (so you get an interactive 
interpreter after the crash, and you can look at sys.path, sys.prefix 
and other ogoodies).
--
Jack Jansen, <Jack.Jansen@cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman