I downloaded and installed json-rpc for Python, ran the simple check
using the ServiceProxy inside a python shell, and it works fine!
But when I copy/paste the example code here
#!/usr/bin/env python
from jsonrpc import handleCGI, ServiceMethod
ServiceMethod
def echo(msg):
return msg
if __name__ == "__main__":
handleCGI()
################## end
I immediately get this error:
Traceback (most recent call last):
File "foo.py", line 11, in ?
handleCGI()
File "/usr/lib/python2.4/site-packages/jsonrpc/cgiwrapper.py", line
45, in handleCGI
CGIServiceHandler(service).handleRequest(fin, fout, env)
File "/usr/lib/python2.4/site-packages/jsonrpc/cgiwrapper.py", line
25, in handleRequest
resultData = ServiceHandler.handleRequest(self, data)
File "/usr/lib/python2.4/site-packages/jsonrpc/serviceHandler.py",
line 78, in handleRequest
resultdata = self.translateResult(result, err, id_)
File "/usr/lib/python2.4/site-packages/jsonrpc/serviceHandler.py",
line 104, in translateResult
err = {"name": err.__class__.__name__, "message":err.message}
AttributeError: ServiceRequestNotTranslatable instance has no
attribute 'message'
Am I doing something really silly that's causing this?
Thanks!
Paul
.