title: GAE standard Flask tutorial: ImportError: cannot import name SpooledTemporaryFile
body: <p>I'm trying the use this <a href="https://cloud.google.com/appengine/docs/standard/python/getting-started/python-standard-env" rel="noreferrer">GAE Flask tutorial</a>.  I believe I followed it exactly and I downloaded the code from Github so there are no typos.</p>
  
  <p>When I start the dev server (<code>dev_appserver.py app.yaml</code>) and go to <a href="http://localhost:8080/form" rel="noreferrer">http://localhost:8080/form</a>, I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/.../google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
      handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
    File "/Users/.../google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
      handler, path, err = LoadObject(self._handler)
    File "/Users/.../google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
      obj = __import__(path[0])
    File "/Users/.../GIT/TEMP/main.py", line 19, in &lt;module&gt;
      from flask import Flask, render_template, request
    File "/Users/.../GIT/TEMP/lib/flask/__init__.py", line 17, in &lt;module&gt;
      from werkzeug.exceptions import abort
    File "/Users/.../GIT/TEMP/lib/werkzeug/__init__.py", line 151, in &lt;module&gt;
      __import__('werkzeug.exceptions')
    File "/Users/.../GIT/TEMP/lib/werkzeug/exceptions.py", line 71, in &lt;module&gt;
      from werkzeug.wrappers import Response
    File "/Users/.../GIT/TEMP/lib/werkzeug/wrappers.py", line 37, in &lt;module&gt;
      from werkzeug.formparser import FormDataParser, default_stream_factory
    File "/Users/.../GIT/TEMP/lib/werkzeug/formparser.py", line 14, in &lt;module&gt;
      from tempfile import SpooledTemporaryFile
  ImportError: cannot import name SpooledTemporaryFile
  </code></pre>
  
  <p>It looks like it has something to do with the GAE sandbox, but I can't figure it out.  I tried running the dev server both inside and outside of the virtualenv.</p>
  
  <p>Is there something special you have to do when using virtualenv with app engine?</p>