>
> You are specifying a CGI script here. If you want to use CGI then set
> threadsafe to "no".
>
> Cheers,
> Brian
Ah, gotcha. A fog of deep misunderstanding is slowly lifting from my
brain, possibly. I could still have some Dunning-Kruger going, so
here's my next attempt:
app.yaml:
---
application: emlynoregan
version: 1
runtime: python27
api_version: 1
threadsafe: true
builtins:
- deferred: on
handlers:
- url: /.*
script: main.app
---
and my main.py now says:
---
import webapp2
from starter import Starter
app = webapp2.WSGIApplication([('/spinystarter', Starter)], debug=True)
---
But I'm still getting the same error. It's related to the built-in
defer, because when I remove
builtins:
- deferred: on
from my app.yaml, it's all good. I suspect I need to not use the
builtin directive, and instead do
app = webapp2.WSGIApplication([('/spinystarter', Starter), (something,
something else)], debug=True)
but I don't know what "something" and "something else" are supposed to
be. Does anyone know?
>
>> ---
>>
>> Upload via appcfg.py:
>> ---
>> Application: emlynoregan; version: 1
>> Host: appengine.google.com
>>
>> Starting update of app: emlynoregan, version: 1
>> Scanning files on local disk.
>> Error 400: --- begin server output ---
>> Error when loading application configuration:
>> Invalid object:
>> Threadsafe cannot be enabled with CGI handler:
>> $PYTHON_LIB/google/appengine/ext/deferred/handler.py
>> ---
>>
>>
>> On 14 October 2011 00:50, Greg Darke (Google) <[email protected]>
>> wrote:
>>> Have you specified 'runtime: python' or 'runtime: python27'?
>>>
>>> If you are using 'runtime: python', then setting 'threadsafe: true' is
>>> not supported.
>>>
>>> On 14 October 2011 00:59, Emlyn <[email protected]> wrote:
>>>> I am using the builtin handler in app.yaml
>>>>
>>>> On Oct 14, 2011 12:25 AM, "Greg Darke" <[email protected]> wrote:
>>>>>
>>>>> On Fri, Oct 14, 2011 at 12:10:09AM +1030, Emlyn wrote:
>>>>> > I'm trying to give python 2.7 a go, with an app that uses
>>>>> > deferred.defer. I'm getting this error when I try to upload it:
>>>>> >
>>>>> > Error 400: --- begin server output ---
>>>>> > Error when loading application configuration:
>>>>> > Invalid object:
>>>>> > Threadsafe cannot be enabled with CGI handler:
>>>>> > $PYTHON_LIB/google/appengine/ext/deferred/handler.py
>>>>> >
>>>>> > Is there a workaround? Or should I even be using deferred.defer in this
>>>>> > context?
>>>>>
>>>>> The easiest way to solve this problem is to remove the explicit handler
>>>>> you are defining, and use the builtin directive as described in
>>>>>
>>>>> http://code.google.com/appengine/docs/python/config/appconfig.html#Builtin_Handlers
>>>>>
>>>>> If you are running the deferred handler at non-default url, you will
>>>>> need to specify the WSGI application in your app.yaml. This is
>>>>> google.appengine.ext.deferred.application
>>>>>
>>>>
>>>
>>
>>
>>
>> --
>> Emlyn
>>
>> http://my.syyn.cc - Synchonise Google+, Facebook, WordPress and Google
>> Buzz posts,
>> comments and all.
>> http://point7.wordpress.com - My blog
>> Find me on Facebook and Buzz
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>
--
Emlyn
http://my.syyn.cc - Synchonise Google+, Facebook, WordPress and Google
Buzz posts,
comments and all.
http://point7.wordpress.com - My blog
Find me on Facebook and Buzz
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.