Tried that, problem remains. From my main.py I log sys.path and it
contains /opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5, where urllib.py* can be found.

More info:

which python2.5
/opt/local/bin/python2.5

python2.5
Python 2.5.2 (r252:60911, Jul 22 2008, 00:43:13)
[GCC 4.0.1 (Apple Inc. build 5478)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib
>>> urllib
<module 'urllib' from '/opt/local/Library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5/urllib.pyc'>
>>>
>>> import os
os.path.exists(os.path.join(os.path.dirname(os.__file__), 'cgi.py'))
>>>
True

defaults read ~/Library/Preferences/
com.google.GoogleAppEngineLauncher
{
    NSNavBrowserPreferedColumnContentWidth = 186;
    NSNavLastCurrentDirectory = "~/p/ivur/GoogleWebApp";
    NSNavLastRootDirectory = "~";
    NSNavPanelExpandedSizeForOpenMode = "{518, 401}";
    NSNavSidebarWidth = 120;
    Python = "/opt/local/bin/python2.5";
}

Not sure what you mean by 'making the symlinks'. But I usually run
from the command line, same output as with GoogleAppEngineLauncher.

Console output:

*** Running dev_appserver with the following flags:
    --admin_console_server= --port=9999
Python command: /opt/local/bin/python2.5
INFO     2008-10-09 17:19:01,061 dev_appserver_main.py] Running
application ice on port 9999: http://localhost:9999
INFO     2008-10-09 17:19:09,502 main.py] path ['/Users/gijsbert/p/
ivur/GoogleWebApp', '/Applications/GoogleAppEngineLauncher.app/
Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/
google_appengine', '/Applications/GoogleAppEngineLauncher.app/Contents/
Resources/GoogleAppEngine-default.bundle/Contents/Resources/
google_appengine/lib/django', '/Applications/
GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-
default.bundle/Contents/Resources/google_appengine/lib/webob', '/
Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/
yaml/lib', '/Applications/GoogleAppEngineLauncher.app/Contents/
Resources/GoogleAppEngine-default.bundle/Contents/Resources/
google_appengine', '/Applications/GoogleAppEngineLauncher.app/Contents/
Resources/GoogleAppEngine-default.bundle/Contents/Resources', '/opt/
local/Library/Frameworks/Python.framework/Versions/2.5/lib/
python25.zip', '/opt/local/Library/Frameworks/Python.framework/
Versions/2.5/lib/python2.5', '/opt/local/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/plat-darwin', '/opt/local/
Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-
mac', '/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/plat-mac/lib-scriptpackages', '/opt/local/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/opt/local/
Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-
dynload', '/opt/local/Library/Frameworks/Python.framework/Versions/2.5/
lib/python2.5/site-packages', '/opt/local/Library/Frameworks/
Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL']
ERROR    2008-10-09 17:19:09,507 dev_appserver.py] Exception
encountered handling request
Traceback (most recent call last):
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 2413, in _HandleRequest
    base_env_dict=env_dict)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 348, in Dispatch
    base_env_dict=base_env_dict)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 1848, in Dispatch
    self._module_dict)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 1766, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 1662, in
ExecuteOrImportScript
    exec module_code in script_module.__dict__
  File "/Users/gijsbert/p/ivur/GoogleWebApp/main.py", line 15, in
<module>
    import re, urllib, os.path
ImportError: No module named urllib

Hope this helps,
Gijsbert



On Oct 8, 11:59 am, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Thanks.  Right now it seems that this is an issue specific to 10.5.5 + the
> App Engine Launcher.  Since I don't have access to a 10.5.5 installation of
> Mac OS, I'd like to ask you to try one more step.
>
> Would it be possible for you to explicitly set the Python Path in the
> Launcher to your python installation?  Or if someone else has 10.5.5 + the
> 1.1.5 SDK if you could do this and see if it solves the issue that would be
> appreciated.
>
> Thanks,
> Marzia
>
> On Wed, Oct 8, 2008 at 8:24 AM, Gijsbert <[EMAIL PROTECTED]> wrote:
>
> > Didn't read the question correctly.
> > Python Path in the launcher is empty. But logging sys.path still
> > reported the correct paths (a whole bunch of app engine paths, then
> > the normal python2.5 paths).
>
> > On Oct 6, 12:59 pm, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote:
> > > Hi,
>
> > > What is the Python Path that you have in your launcher?
>
> > > Thanks,
> > > Marzia
>
> > > On Sun, Oct 5, 2008 at 2:17 PM, Gijsbert <[EMAIL PROTECTED]>
> > wrote:
>
> > > > Hi,
>
> > > > Since upgrading to GAE 1.1.5 my app stopped working, dev_appserver.py
> > > > can't import cgi, urllib, traceback, etc:
>
> > > > <type 'exceptions.ImportError'>: No module named cgi
> > > >      args = ('No module named cgi',)
> > > >      message = 'No module named cgi
>
> > > > Importing these from python2.5 shell works fine.
>
> > > > It might be a MacOS (10.5.5) issue, I just ran the same app on my
> > > > linux box and it works there (well, I could not import
> > > > wsgiref.handlers any more, but changing to run_wsgi_app() made that
> > > > import unnecessary).
>
> > > > A fix would be awesome, since my linux box is old and cranky.
>
> > > > Best regards,
> > > > Gijsbert
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to