try:
def getList():
return db().select(db.classifieds.ALL).as_list()
On Oct 7, 6:13 am, elffikk <[email protected]> wrote:
> Hi,
>
> I am pretty new to web2py and ... need help :)
>
> I am trying this and works (json service)
>
> def call(): return service()
>
> @service.json
> def getList():
> return db().select(db.classifieds.ALL)
>
> but with amf doesn't work
>
> def call(): return service()
>
> @service.amfrpc
> def getList():
> return db().select(db.classifieds.ALL)
>
> in logs I found this message:
>
> Traceback (most recent call last):
> File "gluon/restricted.py", line 178, in restricted
> File "C:/Documents and Settings/Vasile/Desktop/web2py_win/web2py/
> applications/info777/controllers/classifieds.py", line 21, in <module>
> File "gluon/globals.py", line 102, in <lambda>
> File "C:/Documents and Settings/Vasile/Desktop/web2py_win/web2py/
> applications/info777/controllers/classifieds.py", line 1, in call
> File "gluon/tools.py", line 2426, in __call__
> File "gluon/tools.py", line 2369, in serve_amfrpc
> File "C:\Documents and Settings\Vasile\Desktop\web2py_win\web2py
> \pyamf\remoting\__init__.py", line 634, in decode
> File "C:\Documents and Settings\Vasile\Desktop\web2py_win\web2py
> \pyamf\util\__init__.py", line 322, in read_uchar
> File "C:\Documents and Settings\Vasile\Desktop\web2py_win\web2py
> \pyamf\util\__init__.py", line 298, in _read
> File "C:\Documents and Settings\Vasile\Desktop\web2py_win\web2py
> \pyamf\util\__init__.py", line 646, in read
> IOError: Attempted to read 1 bytes from the buffer but only 0 remain
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---