One of the more mysterious errors one gets with App Engine is when the application fails to start up with the following error:
*** Running dev_appserver with the following flags: --admin_console_server= --port=8080 Python command: /usr/bin/python2.6 Traceback (most recent call last): File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/ dev_appserver.py", line 68, inrun_file(__file__, globals()) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine /dev_appserver.py", line 64, in run_file execfile(script_path, globals_) File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/ GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/ appengine/tools/dev_appserver_main.py", line 66, in from google.appengine.tools import os_compat ImportError: cannot import name os_compat
If you look through the forums there is a lot of talk about Python 2.5 or Python 2.6 and suggestions to go back to Python 2.5 – that seems not to be the problem at all because it fails in 2.5 as well with the same error.
I have carefully reproduced the problem and it is when a non-administrator person tries to run the App Engine Launcher. The fix is to simply make the person an administrative user. And here is the strange thing – once you make the use an “Allow to administer this computer” user and start App Engine once as an the user with admin powers and then log out and take a way admin powers and then log back in – then it works! Crazy.
This problem is generally reported on Mac OS 10.6 versions.
Now after an hour of debugging and researching, I can get back to recording those “introductory – see how easy this to install” videos :)