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)
--
To unsubscribe, reply using "remove me" as the subject.