Just updated GAE Python dev environment from 1.7.0 to 1.7.7, and hit an error:
ImportError: No module named json
So I created a minimum test case, here's the app.yap:
application: myapp
version: 1
api_version: 1
runtime: python27
threadsafe: true
libraries:
- name: jinja2
version: "2.6"
handlers:
- url: /test.*
script: test.app
login: required
- url: /.*
script: routes.app
login: required
and the test.py:
import webapp2
import json
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.out.write("test.py")
app = webapp2.WSGIApplication([('/test', MainHandler)],
debug=True)
Switching dev environments is perfectly consistent - the error is thrown on 1.7.7 but not 1.7.0 (running dev environment from terminal on Linux). I've not tried uploading this to a production environment. It occurred while attempting to upgrade from Python 2.5 to 2.7, so may be due to my unfamiliarity with 2.7.
import json
in the python interpreter? – MichaelJCox