I just upgraded to the App Engine Python Development server version 1.7.6 on OS X, and since upgrading, I'm receiving the following error when I try to run my app:
ERROR 2013-04-02 04:05:14,268 wsgi.py:219]
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 196, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 255, in _LoadHandler
handler = __import__(path[0])
File "/Users/rmorlok/Dropbox/ryanroot/ryan-projects/Development/docalytics/online/main.py", line 13, in <module>
from google.appengine.tools import dev_appserver
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 62, in <module>
import simplejson
ImportError: No module named simplejson
I made sure that simplejson is installed by running
sudo pip install simplejson
which completed successfully. I can successfully import simplejson if I run Python on the console and import it, but when running my app via PyCharm or the GoogleAppengineLaunch, I get the above error.
Does anyone know what's going on?
If you are using eclipse you have to
pip install simplejson
on the console and then reset your python interpreter. To do this you must:SimpleJson has been renamed to Json in one of the latest versions. If you don't update to the latest version of simplejson you wouldn't have this problem. So you can revert to a earlier version or you can add the following to the top of the python file that gives the problem:
Probably Google has some requirement on the versions when you install the App Engine SDK for python.
This problem may be caused by version conflict or wrong configuration of sys.path. Here are some advises:
/usr/local/google_appengine
and/Applications/GoogleAppEngineLauncher.app/
/Applications/GoogleAppEngineLauncher.app/
by default it creates a symlink in/usr/local/google_appengine
When symlink is created, check permissions and make sure your system variables are set up as needed, this topic could be helpful Configuring App Engine path for PyDev on MacIf nothing helps you need to dig deeper. For our purposes we have customized version of launcher in our project(to avoid some staff which appengine sdk stubs in standard library). Here it is http://pastebin.com/iU2PsGhE
Environment setup is done by those steps(both: in our case and in sdk):
If nothing above helps feel free to comment this answer, we will find a solution.