I installed R-2.15.4.
You are right that I don't get any function parameters in the functions 
that handle my Google tasks.

I am getting a weird error.

In the function handling the Google task that historically worked) the 
value of `request.body` is:
<open file '<fdopen>', mode 'w+b' at 0x2b31c3ed9930>

That is weird. For the payload of the Google task I'm passing in some json 
data.

I can't see where an fdopen value would be coming from.


On Friday, 24 May 2019 21:37:53 UTC+1, Dave S wrote:
>
>
>
> On Friday, May 24, 2019 at 3:43:26 AM UTC-7, Carl Hunter Roach wrote:
>>
>> This code has been working for a couple of years but, for an unknown 
>> reason to me, has stopped working.
>>
>> This function continues to create Tasks correctly.
>>
>>     def send_task():
>>             from google.appengine.api import taskqueue
>>             json_data = ...
>>             task = taskqueue.Task(url=..., countdown=2, payload=json_data)
>>             task.add()
>>
>> The handling url is passed to:
>>
>>     in db.py
>>     openings_service = Service()
>>
>>
>>     in controller...
>>     @openings_service.json
>>     def opening_task_queue():
>>         body_data = request.body.getvalue()
>>
>> For the last couple of years `body_data` was populated and processing 
>> continued.
>> But last week, without change to my code, request.body was no longer 
>> present.
>>
>> I had been running with Web2py R-2.14.6 but an upgrade to R-2.15.0b2 
>> broke how I needed to declare functions.
>>
>
>
> Ooooh, yuck.  2.15.0b2 is not a good choice; I'm using 2.15.4, and the 
> 2.18.x line is much, much better (pending upgrade, but I've been letting 
> other people shake the low-hanging fruit off first)
>
>  
>
>>
>> Where I had been using function headings with no parameters:
>>
>>     @openings_service.json
>>     def submit_openings():
>>
>> I now needed to declare:
>>
>>     @openings_service.json
>>     def submit_openings(openings):
>>
>> Does anyone know why?
>> And does that relate to the error I detail at the top of this post?
>>
>>
> That change should not be the case.   Functions as URL targets should not 
> have parameters, and none of my @auth_requires_login() or 
> @request.restful() uses have had to add parameters after the annotation.
>
> /dps
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/34b2e692-fd2f-448f-b6eb-dab4ea40229f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to