Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error importing simplejson after upgrading to appengine dev server 1.7.6

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?

like image 332
Ryan Morlok Avatar asked Jan 31 '26 22:01

Ryan Morlok


1 Answers

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:

import json as simplejson

Probably Google has some requirement on the versions when you install the App Engine SDK for python.

like image 158
Peter Fortuin Avatar answered Feb 03 '26 14:02

Peter Fortuin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!