Massimo, I got the same thing (see below). Note that the original way I was
calling worked on my local development machine. By work I mean if I pas valid
credentials I can acces the function and know that I m loggend in AND if I pass
invalid credentials I get the 303 error. In other words it works perfectly
locally. The dev machine is Windows 7 and the remote system is Linux/Apache.
Very weird.
>>> rserver =
>>> xmlrpclib.Server("http://%s:%[email protected]/init/default/call/xmlrpc"
>>> % (urllib.quote("[email protected]"),urllib.quote("xxx")))
>>> rserver.getmeetings()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
line 1147, in __call__
return self.__send(self.__name, args)
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
line 1437, in __request
verbose=self.__verbose
File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
line 1191, in request
headers
xmlrpclib.ProtocolError: <ProtocolError for
david.waldrop%40gmail.com:[email protected]/init/default/call/xmlrpc:
303 SEE OTHER>
>>>
On Nov 2, 2010, at 1:52 PM, mdipierro wrote:
Please try:
rserver = xmlrpclib.Server("http://%s:%[email protected]/init/
default/call/xmlrpc"
% (urllib.quite(email),urllib.quote(password))
Moreover I made a mistake in my previous advice. It should be
@auth.requires_login()
def call(): return service()
and NOT
@auth.requires(auth.user)
def call(): return service()
On Nov 2, 12:41 pm, David Waldrop <[email protected]> wrote:
> I tried several variations of encoding the url but got the following.
>
> Last login: Mon Nov 1 05:46:43 on ttys000
> pydlw-mac-laptop:~ David$ python
> Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
> [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.>>>
> import urlib
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> ImportError: No module named urlib>>> import urllib
>>>> import xmlrpclib
>>>> rserver =
>>>> xmlrpclib.Server("http://[email protected]:[email protected]/init/default/call/xmlrpc")
>>>> rserver.getmeetings()
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1147, in __call__
> return self.__send(self.__name, args)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1437, in __request
> verbose=self.__verbose
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1191, in request
> headers
> xmlrpclib.ProtocolError: <ProtocolError for
> [email protected]:[email protected]/init/default/call/xmlrpc:303
> SEE OTHER>
>
>>>> rserver =
>>>> xmlrpclib.Server(urllib.quote("http://[email protected]:[email protected]/init/default/call/xmlrpc"))
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1411, in __init__
> raise IOError, "unsupported XML-RPC protocol"
> IOError: unsupported XML-RPC protocol
>
>>>> rserver =
>>>> xmlrpclib.Server("http://"+urllib.quote("[email protected]:xxx")+"@www.meetingmonkey.net/init/default/call/xmlrpc")
>>>> rserver.getmeetings()
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1147, in __call__
> return self.__send(self.__name, args)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1437, in __request
> verbose=self.__verbose
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1191, in request
> headers
> xmlrpclib.ProtocolError: <ProtocolError for
> david.waldrop%40gmail.com%[email protected]/init/default/call/xmlrpc:303
> SEE OTHER>
>
>>>> rserver =
>>>> xmlrpclib.Server("http://"+urllib.quote("[email protected]:x...@x")+"www.meetingmonkey.net/init/default/call/xmlrpc")
>>>> rserver.getmeetings()
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1147, in __call__
> return self.__send(self.__name, args)
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1437, in __request
> verbose=self.__verbose
> File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xmlrpclib.py",
> line 1191, in request
> headers
> xmlrpclib.ProtocolError: <ProtocolError for
> david.waldrop%40gmail.com%3Axx%40xwww.meetingmonkey.net/init/default/call/xmlrpc:303
> SEE OTHER>
>
> On Nov 2, 2010, at 12:55 PM, mdipierro wrote:
>
>> import xmlrpclib
>> rserver =
>> xmlrpclib.Server("http://[email protected]:[email protected]/i
>> nit/default/call/xmlrpc")
>> rserver.getmeetings()
>
>