xmlrpclib.py exception while trying to raise exception

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

xmlrpclib.py exception while trying to raise exception

ssteiner
Hi!

Not totally sure this is the right list for this but...

This just popped up in a program that has successfully (in this run) made thousands of multicall()s.

Then, out of the blue, this came up.

I couldn't find anything like this in the bug tracker.

Anyone have any clues about why the exception itself wouldn't be defined or should I just file a bug?

Thanks,

S
aka/ssteinerX
aka/Steve Steiner

  mc_result = multicall()                                                                                        
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1042,                  
in __call__                                                                                                        
    return MultiCallIterator(self.__server.system.multicall(marshalled_list))                                      
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1199, in __call__                                                                                                        
    return self.__send(self.__name, args)                                                                          
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1489, in __request                                                                                                      
    verbose=self.__verbose                                                                                          
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1253, in request                                                                                                        
    return self._parse_response(h.getfile(), sock)                                                                  
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response                                                                                                  
    return u.close()                                                                                                
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 838, in close                                                                                                              
    raise Fault(**self._stack[0])                                                                                  
Fault: <Fault 1: "<type 'exceptions.NameError'>:global name 'Fault' is not defined">


_______________________________________________
XML-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/xml-sig
Reply | Threaded
Open this post in threaded view
|

Re: xmlrpclib.py exception while trying to raise exception

"Martin v. Löwis"
> Anyone have any clues about why the exception itself wouldn't be defined or should I just file a bug?

This is probably during Python shutdown. Python is in the process of
clearing all module dictionaries, and then some destructor still wants
to find the Fault class.

You should make sure that all connections get closed properly before
shutting down Python.

Regards,
Martin
_______________________________________________
XML-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/xml-sig
Reply | Threaded
Open this post in threaded view
|

Re: xmlrpclib.py exception while trying to raise exception

ssteiner

On Jan 16, 2010, at 1:23 PM, Martin v. Löwis wrote:

>> Anyone have any clues about why the exception itself wouldn't be defined or should I just file a bug?
>
> This is probably during Python shutdown. Python is in the process of
> clearing all module dictionaries, and then some destructor still wants
> to find the Fault class.
>
> You should make sure that all connections get closed properly before
> shutting down Python.

Ok, this seems to have happened at the end of a script and it looks like an exception when it was trying to shut down the xmlrpc connection.

S

_______________________________________________
XML-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/xml-sig
Reply | Threaded
Open this post in threaded view
|

Re: xmlrpclib.py exception while trying to raise exception

Dieter Maurer
In reply to this post by ssteiner
[hidden email] wrote at 2010-1-15 21:47 -0500:

>This just popped up in a program that has successfully (in this run) made thousands of multicall()s.
> ...
>Anyone have any clues about why the exception itself wouldn't be defined or should I just file a bug?
> ...
>File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1042,                  
>in __call__                                                                                                        
>    return MultiCallIterator(self.__server.system.multicall(marshalled_list))                                      
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1199, in __call__                                                                                                        
>    return self.__send(self.__name, args)                                                                          
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1489, in __request                                                                                                      
>    verbose=self.__verbose                                                                                          
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1253, in request                                                                                                        
>    return self._parse_response(h.getfile(), sock)                                                                  
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response                                                                                                  
>    return u.close()                                                                                                
>  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 838, in close                                                                                                              
>    raise Fault(**self._stack[0])                                                                                  
>Fault: <Fault 1: "<type 'exceptions.NameError'>:global name 'Fault' is not defined">

Almost surely, the "NameError" comes from your XMLRPC server, not
the XMLRPC client.

If you are lucky, your server logs sufficient information for exceptions
(e.g. the traceback) to allow you to find out where the exception
occurred.



--
Dieter
_______________________________________________
XML-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/xml-sig
Reply | Threaded
Open this post in threaded view
|

Re: xmlrpclib.py exception while trying to raise exception

ssteiner

On Jan 17, 2010, at 2:21 AM, Dieter Maurer wrote:

> [hidden email] wrote at 2010-1-15 21:47 -0500:
>> This just popped up in a program that has successfully (in this run) made thousands of multicall()s.
>> ...
>> Anyone have any clues about why the exception itself wouldn't be defined or should I just file a bug?
>> ...
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1042,                  
>> in __call__                                                                                                        
>>   return MultiCallIterator(self.__server.system.multicall(marshalled_list))                                      
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1199, in __call__                                                                                                        
>>   return self.__send(self.__name, args)                                                                          
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1489, in __request                                                                                                      
>>   verbose=self.__verbose                                                                                          
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1253, in request                                                                                                        
>>   return self._parse_response(h.getfile(), sock)                                                                  
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response                                                                                                  
>>   return u.close()                                                                                                
>> File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 838, in close                                                                                                              
>>   raise Fault(**self._stack[0])                                                                                  
>> Fault: <Fault 1: "<type 'exceptions.NameError'>:global name 'Fault' is not defined">
>
> Almost surely, the "NameError" comes from your XMLRPC server, not
> the XMLRPC client.
>
> If you are lucky, your server logs sufficient information for exceptions
> (e.g. the traceback) to allow you to find out where the exception
> occurred.

Thanks.  Unfortunately I don't have access to the remote -- it's a service run by another company.

This seems to have occurred during shutdown when the connection was trying to close itself but the Fault object had already been removed.

Thanks,

S

_______________________________________________
XML-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/xml-sig