Please do not invest any more time investigating this problem further.
The pyjamas install that I originally used was from the FreeBSD ports
collection. I downloaded the pyjamas 05p1 directly and set it up in a
'sandbox'. I recreated the output using the sandbox pyjsbuild and it
works correctly without any error. Looks like something in the ports
version is flawed.

Sorry about that!

On Apr 15, 10:02 am, mdipierro <[email protected]> wrote:
> It is a client problem. It appears to be passing multiple instances of
> the "method" field in the request.body. I think there are some Pyjamas
> folks here. Perhaps they can explain why happens and whether it is a
> bug or if web2py should support this.
>
> On Apr 15, 10:08 am, The Czar <[email protected]> wrote:
>
> > I am working to become familiar with both web2py & pyjamas. I
> > implemented the example todo application and receive exactly the same
> > error that Nicolás de la Torre reported on 06/07/09. I am using
> > Current Version 1.76.5 and pyjamas 0.5p. I also used the web2py built-
> > in web server (not apache) and running on FreeBSD 8.0. Has anyone
> > tried this on the new release? Any insight / guidance is greatly
> > appreciated. The following error is encountered:
>
> > Traceback (most recent call last):
> >   File "/m/content/www/data/todoapp/gluon/restricted.py", line 173, in
> > restricted
> >     exec ccode in environment
> >   File "/m/content/www/data/todoapp/applications/todo/controllers/
> > default.py", line 25, in <module>
> >   File "/m/content/www/data/todoapp/gluon/globals.py", line 96, in
> > <lambda>
> >     self._caller = lambda f: f()
> >   File "/m/content/www/data/todoapp/applications/todo/controllers/
> > default.py", line 20, in call
> >     return service()
> >   File "/m/content/www/data/todoapp/gluon/tools.py", line 2966, in
> > __call__
> >     return self.serve_jsonrpc()
> >   File "/m/content/www/data/todoapp/gluon/tools.py", line 2877, in
> > serve_jsonrpc
> >     if not method in methods:
> > TypeError: list objects are unhashable
>
> > here is the file:
>
> > def index():
> >     redirect(URL(r=request,f='todoApp'))
>
> > @service.jsonrpc
> > def getTasks():
> >     todos = db(db.todo.id>0).select()
> >     return [(todo.task,todo.id) for todo in todos]
>
> > @service.jsonrpc
> > def addTask(taskFromJson):
> >     db.todo.insert(task= taskFromJson)
> >     return getTasks()
>
> > @service.jsonrpc
> > def deleteTask (idFromJson):
> >     del db.todo[idFromJson]
> >     return getTasks()
>
> > def call():
> >     return service()
>
> > def todoApp():
> >     return dict()
>
> > response._vars=response._caller(call)


-- 
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

Reply via email to