When I call Zope.app() I get a traceback saying from Products.PythonScripts.PythonScript import PythonScript ImportError: Mo module named PythonScripts.PythonScript what does this mean? Under Products I have the dir PythonScripts and it has the module PythonScript. In the debugger... I can call import Products right before the fatal line. But I cant import any Product itself. Mathew
Adjust your PYTHONPATH to <zopeinst>/lib/python and try again. -aj --On Sonntag, 20. April 2003 13:56 Uhr -0700 mathew <mathew@yeates.tv> wrote:
When I call Zope.app() I get a traceback saying
from Products.PythonScripts.PythonScript import PythonScript ImportError: Mo module named PythonScripts.PythonScript
what does this mean? Under Products I have the dir PythonScripts and it has the module PythonScript. In the debugger... I can call import Products right before the fatal line. But I cant import any Product itself. Mathew
No. This isnt it. Look at my message. I step into the debugger right before the line from Products.PythonScripts.PythonScript import PythonScript and (pdb) import Products works, but (pdb) import Products.PythonScripts doesnt work. Mathew ----- Original Message ----- From: "Andreas Jung" <andreas@andreas-jung.com> To: "mathew" <mathew@yeates.tv>; <zope@zope.org> Sent: Monday, April 21, 2003 4:43 AM Subject: Re: [Zope] error calling Zope.app()
Adjust your PYTHONPATH to <zopeinst>/lib/python and try again.
-aj
--On Sonntag, 20. April 2003 13:56 Uhr -0700 mathew <mathew@yeates.tv> wrote:
When I call Zope.app() I get a traceback saying
from Products.PythonScripts.PythonScript import PythonScript ImportError: Mo module named PythonScripts.PythonScript
what does this mean? Under Products I have the dir PythonScripts and it has the module PythonScript. In the debugger... I can call import Products right before the fatal line. But I cant import any Product itself. Mathew
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
mathew wrote at 2003-4-21 10:15 -0700:
No. This isnt it. Look at my message. I step into the debugger right before the line from Products.PythonScripts.PythonScript import PythonScript and (pdb) import Products works, but (pdb) import Products.PythonScripts doesnt work.
Check which "Products" you got: (pdb) p Products.__path__ It may well be a "Products" you do not want. Dieter
Whoa... what the hell? I set a breakpoint before the line from Products.PythonScripts.PythonScript import PythonScript then (pdb) import Products (pdb) print Products.__path__ [] Huh?? At an earlier place in the code Products.__path__ definitely had what looked to be the correct path. Where and why is it being reset? Mathew ----- Original Message ----- From: "Dieter Maurer" <dieter@handshake.de> To: "mathew" <mathew@yeates.tv> Cc: "Andreas Jung" <andreas@andreas-jung.com>; <zope@zope.org> Sent: Tuesday, April 22, 2003 12:06 PM Subject: Re: [Zope] error calling Zope.app()
mathew wrote at 2003-4-21 10:15 -0700:
No. This isnt it. Look at my message. I step into the debugger right before the line from Products.PythonScripts.PythonScript import PythonScript and (pdb) import Products works, but (pdb) import Products.PythonScripts doesnt work.
Check which "Products" you got:
(pdb) p Products.__path__
It may well be a "Products" you do not want.
Dieter
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
mathew wrote at 2003-4-23 16:35 -0700:
I set a breakpoint before the line from Products.PythonScripts.PythonScript import PythonScript
then (pdb) import Products (pdb) print Products.__path__ []
There is code in "App/FindHomes.py" that can do this when some environment variables are set (unfortunately). Dieter
participants (3)
-
Andreas Jung -
Dieter Maurer -
mathew