Skip to content Skip to sidebar Skip to footer

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

Solution 1:

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.


Solution 2:

This problem may be caused by version conflict or wrong configuration of sys.path. Here are some advises:

  • Make sure you have only one version of sdk installed. You may have two versiones installed in /usr/local/google_appengine and /Applications/GoogleAppEngineLauncher.app/
  • After you reinstalled your appengine, run appengine launcher in /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 Mac
  • When using pycharm make sure you have appegine support enabled.
  • If you are using virtualenv make sure appengine is in sys.path.
  • You may try to add $APPENGINEPATH/lib to sys.path
  • If this problem persists understand which server are you using dev_appserver or dev_appserver2, see details in release notes

If 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):

  1. Locate appengine root directory.
  2. Fid DIR_PATH, which is for some reason $APPENGINEPATH/lib/ipaddr
  3. Import the right versions of third party libraries located in $APPENGINEPATH/lib/

If nothing above helps feel free to comment this answer, we will find a solution.


Solution 3:

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:

  1. right click on your PyDev project and click propterties
  2. select python interpretor/grammar on the left pane
  3. click the blue link that says configure interpreter
  4. Click remove on the top right and then autoconfig
  5. If auto config does not work manually find your python.exe inside your python installation folder

Post a Comment for "Error Importing Simplejson After Upgrading To Appengine Dev Server 1.7.6"