473,396 Members | 2,111 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,396 software developers and data experts.

xmlrpclib/timeoutsocket not happy together in 2.3

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 communicate
with. I can call remote procedures still, but as soon as I import
timeoutsocket and the old socket switcharoo is done it's over.

To add to the fun I can use xmlrpc w/timeoutsocket if calling
functions at the ubiquitous betty.userland.com example, but not the
servers I've been talking to for the last two years. Example:

Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
import xmlrpclib
s=xmlrpclib.Server('http://myrpcserver/server')
s.version() 22 s.localTime() '9/16/2003 12:16:38 PM' import timeoutsocket
s.version() Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python23\lib\xmlrpclib.py", line 1029, in __call__
return self.__send(self.__name, args)
File "C:\Python23\lib\xmlrpclib.py", line 1316, in __request
verbose=self.__verbose
File "C:\Python23\lib\xmlrpclib.py", line 1080, in request
return self._parse_response(h.getfile(), sock)
File "C:\Python23\lib\xmlrpclib.py", line 1217, in _parse_response
p.close()
File "C:\Python23\lib\xmlrpclib.py", line 531, in close
self._parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: no element found: line 1, column 0 s.localTime() Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python23\lib\xmlrpclib.py", line 1029, in __call__
return self.__send(self.__name, args)
File "C:\Python23\lib\xmlrpclib.py", line 1316, in __request
verbose=self.__verbose
File "C:\Python23\lib\xmlrpclib.py", line 1080, in request
return self._parse_response(h.getfile(), sock)
File "C:\Python23\lib\xmlrpclib.py", line 1217, in _parse_response
p.close()
File "C:\Python23\lib\xmlrpclib.py", line 531, in close
self._parser.Parse("", 1) # end of data
xml.parsers.expat.ExpatError: no element found: line 1, column 0 s=xmlrpclib.Server('http://betty.userland.com')
s.examples.getStateName(41)

'South Dakota'

Obviously the bad element here is the remote servers I communicate
with since userland works, but this just started with 2.3 and I'm
curious if anyone else has had a similar problem before I start
digging into this.

Thanks.

- Larry
Jul 18 '05 #1
0 1744

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

Similar topics

0
by: sashan | last post by:
Hi I'm having trouble using xmlrpclib. I register a function (or class) with the SimpleXMLRPCServer and initiate the server. I then create a ServerProxy object and connect to the xml-rpc...
6
by: Gilles Lenfant | last post by:
Hi, I'm looking for the "official" timeoutsocket.py by Timothy O'Malley (maybe he'll read this :) I got this in my bookmarks... http://www.timo-tasi.org/python/timeoutsocket.py ....but...
0
by: Raja | last post by:
Hello Im trying to catch timeouts from a socket and my code looks like try: timeoutsocket.setDefaultSocketTimeout(10) s = timeoutsocket.timeoutsocket(timeoutsocket.AF_INET,...
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: 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...
4
by: skilpat | last post by:
Can anybody provide a mirror for this module? The original URL seems to be down. I have been looking for over an hour, and every single resource that uses it links to the timo-tasi.org site to...
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: 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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.