Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError for jsonrpc

I am trying to follow this walkthrough on how to use the ServiceProxy in jsonrpc.

I followed the directions but I am getting an error no the import of the ServiceProxy.

Here is the code I am using:

#!usr/bin/python
import sys
import json
from jsonrpc import ServiceProxy

givex = jsonrpc.ServiceProxy()
print "foo"

which is resulting in:

enter image description here

Would anyone be able to help me out with some ideas on how to fix this, or have a suggestion for a better jsonrpc library to use.

like image 943
B-M Avatar asked Feb 03 '26 14:02

B-M


1 Answers

The tutoral you are following seems to be outdated. Try

from jsonrpc.proxy import JSONRPCProxy
givex = JSONRPCProxy.from_url("http://localhost/url/of/your/service.py")
like image 146
Bartosz Marcinkowski Avatar answered Feb 05 '26 03:02

Bartosz Marcinkowski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!