473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

xmlrpclib - methodHelp doesn't work

I tried out the examples in this website for XML-RPC using python -
http://www.onlamp.com/pub/a/python/2...nt.html?page=2
But I get the following errors when I try to execute the code. Here is
the snippet of the code with the error messages.

<snip>
meerkatsvr.system.methodSignature(meerkat.getChann els) Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'meerkat' is not defined meerkatsvr.system.methodHelp(meerkat.getItems)

Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'meerkat' is not defined

</snip>

can someone tell me what is wrong.

Also is there any good online resource for XML-RPC with Python.

Jul 19 '05 #1
2 1325
sr*********@gmail.com wrote:
I tried out the examples in this website for XML-RPC using python -
http://www.onlamp.com/pub/a/python/2...nt.html?page=2
But I get the following errors when I try to execute the code. Here is
the snippet of the code with the error messages.

meerkatsvr.system.methodSignature(meerkat.getC hannels)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'meerkat' is not defined
meerkatsvr.system.methodHelp(meerkat.getItem s)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
NameError: name 'meerkat' is not defined


You have to give the method names as strings. Your code is looking for a 'getChannels' or 'getItems' attribute of something named 'meerkat', but there is no such name in the current scope. Try this:

Type "help", "copyright", "credits" or "license" for more information.
import xmlrpclib
meerkatURI = "http://www.oreillynet.com/meerkat/xml-rpc/server.php"
meerkatsvr = xmlrpclib.Server(meerkatURI)
meerkatsvr.system.listMethods() ['meerkat.getChannels', 'meerkat.getCategories', 'meerkat.getCategoriesBySubstring', 'meerkat.getChannelsByCategory', 'meerkat.getChannelsBySubstring', 'meerkat.getItems', 'system.listMethods', 'system.methodHelp', 'system.methodSignature'] print meerkatsvr.system.methodSignature('meerkat.getChan nels') [['array']] print meerkatsvr.system.methodHelp('meerkat.getItems')

Returns an array of structs of RSS items given a recipe struct.
<etc>

Kent
Jul 19 '05 #2
oh. missed that one.
thanks a lot.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Larry | last post by:
I've had a production system running for a long time that uses xmlrpclib with timeoutsocket, and with my recent upgrade to 2.3 it's no longer able to use xmlrpclib with the xmlrpc servers I...
2
by: p2esp | last post by:
Hello, I'm using the xmlrpclib module to contact an XMLRPC server that takes a long time to send results back. My client timeouts. The question is whether there is a way to have an xmlrpclib...
1
by: Gabriel PASTOR | last post by:
I'm trying to send object using xmlrpclib, but it seems that classes inheriting from object cannot be marshalled. Here is an example: -------- server.py -------- import xmlrpclib,...
3
by: flupke | last post by:
Hi, previously i made an application that used sockets to do some network based processing. My next app is again going to be a client/server app and i wanted to see if i can't find an easier...
3
by: writeson | last post by:
Hi, I tried the xmlrpclib examples from the Python Cookbook and had a problem. The example works fine so long as the server and client are on the same machine. But as soon as I try to run the...
3
by: Rune Froysa | last post by:
Trying something like:: import xmlrpclib svr = xmlrpclib.Server("http://127.0.0.1:8000") svr.test("\x1btest") Failes on the server with:: xml.parsers.expat.ExpatError: not well-formed (invalid...
0
by: Willi Langenberger | last post by:
Hi! We have an application server (Zope) and make heavy use of xml-rpc. One problem arised, when we tried to return a zope.DateTime instance. xmlrpclib (naturally) knows nothing about...
5
by: Jonathan Ballet | last post by:
Hello, I have developped a XMLRPC server, which runs under Gnu/Linux with python2.3. This server receives method calls from Windows client. The server got some parameters which are string,...
0
by: Arno Stienen | last post by:
Perhaps I should be a bit more specific. When using this code to connect to a remote XML-RPC server (C++, xmlrpc++0.7 library): import xmlrpclib server =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.