Massimo, thanks a lot for taking the time to look into this !

So :

1) as usual, you are right :-)

2) your "quick fix" doesn't work, maybe because my column type is
datetime.date, not datetime.datetime ?

3) it doesn't matter for now, because I added a three-line hack
instead to replace the datetime.date objects with strings before
uploading, so everything works again :-)

4) I understand that using an "internal object" is bad practice and
leads to this sort of breakage.
What should I use instead in this case, to avoid this in the
future ?...

Many thanks,
fp

PS: having web2py in my pocket never ceases to amaze me... Sharp
Zaurus, then Nokia N810 and N900, now an Android phone... it just
works :-)


On 18 jan, 15:55, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> Got it. The problem is that you are using an internal object here
> (rows.response)
>
>     status, response.flash = client.accept(rows.colnames,
> rows.response)
>
> and something has changed in there. Notice the error is not in the
> server but in the client. rows is a Rows object generated by
> db(....).select().
> Somehow before, it was returning strings for dates. Now it is
> returning datetime.date objects from data and the ServerProxy client
> does not know how to serialize that. when sending the request to the
> server.
>
> Try replace
>
>     client = xmlrpclib.ServerProxy(target+'/current/
> handle',allow_none=True)
>
> with
>
>     client = xmlrpclib.ServerProxy(target+'/current/
> handle',allow_none=True,use_datetime=True)
>

Reply via email to