Google Groups Home
Help | Sign in
#836: Can't raise exceptions over XMLRPC
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
CherryPy  
View profile
 More options Jul 5, 6:03 pm
From: CherryPy <t...@cherrypy.org>
Date: Sat, 05 Jul 2008 22:03:39 -0000
Local: Sat, Jul 5 2008 6:03 pm
Subject: [CherryPy] #836: Can't raise exceptions over XMLRPC

#836: Can't raise exceptions over XMLRPC
---------------------------+----------------------------------------------- -
 Reporter:  guest          |       Owner:  fumanchu              
     Type:  defect         |      Status:  new                    
 Priority:  high           |   Milestone:  3.1                    
Component:  CherryPy code  |    Keywords:  on_error error handling
---------------------------+----------------------------------------------- -
 Hey guys... there seems to be a bug when trying to raise an exception
 across XMLRPC (this has worked for me before, not sure when it crept up).
 Since it dies on the server side because '''!TypeError: on_error() takes
 no arguments (1 given)''' this results in a '''!ProtocolError:
 <!ProtocolError for host:8080/api/: 500 Internal Server Error>''' on the
 client side. It's probably a pretty trivial fix for you who know what's
 going on; I've looked through the code but couldn't figure it out.

 {{{
 #!python
 [05/Jul/2008:15:36:25] HTTP Traceback (most recent call last):
   File "/var/lib/python-support/python2.5/cherrypy/_cprequest.py", line
 551, in respond
     cherrypy.response.body = self.handler()
   File "/var/lib/python-support/python2.5/cherrypy/_cpdispatch.py", line
 24, in __call__
     return self.callable(*self.args, **self.kwargs)
   File "/var/lib/python-support/python2.5/cherrypy/_cptools.py", line 258,
 in __call__
     body = subhandler(*(vpath + rpcparams), **params)
   File "test.py", line 62, in function
     raise Exception("test")
 Exception: test

 [05/Jul/2008:15:36:25]  Traceback (most recent call last):
   File "/var/lib/python-support/python2.5/cherrypy/_cprequest.py", line
 485, in run
     self.respond(pi)
   File "/var/lib/python-support/python2.5/cherrypy/_cprequest.py", line
 565, in respond
     self.handle_error(sys.exc_info())
   File "/var/lib/python-support/python2.5/cherrypy/_cprequest.py", line
 670, in handle_error
     self.error_response()
   File "/var/lib/python-support/python2.5/cherrypy/_cptools.py", line 172,
 in _wrapper
     self.callable(**self._merged_args())
 TypeError: on_error() takes no arguments (1 given)

  - - [05/Jul/2008:15:36:25] "POST /api/ HTTP/1.0" 500 - "" ""

 [05/Jul/2008:15:36:25] HTTP Traceback (most recent call last):
   File "/var/lib/python-support/python2.5/cherrypy/_cprequest.py", line
 551, in respond
     cherrypy.response.body = self.handler()
   File "/var/lib/python-support/python2.5/cherrypy/_cpdispatch.py", line
 24, in __call__
     return self.callable(*self.args, **self.kwargs)
   File "test.py", line 73, in index
     print x.function()
   File "/usr/lib/python2.5/xmlrpclib.py", line 1147, in __call__
     return self.__send(self.__name, args)
   File "/usr/lib/python2.5/xmlrpclib.py", line 1437, in __request
     verbose=self.__verbose
   File "./web/resource/xmlrpcclient.py", line 95, in request
     headers
 ProtocolError: <ProtocolError for host:8080/api/: 500 Internal Server
 Error>

 }}}

--
Ticket URL: <http://www.cherrypy.org/ticket/836>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
CherryPy  
View profile
 More options Jul 5, 10:37 pm
From: CherryPy <t...@cherrypy.org>
Date: Sun, 06 Jul 2008 02:37:45 -0000
Local: Sat, Jul 5 2008 10:37 pm
Subject: Re: [CherryPy] #836: Can't raise exceptions over XMLRPC

#836: Can't raise exceptions over XMLRPC
-------------------------------------+------------------------------------- -
 Reporter:  guest                    |        Owner:  fumanchu
     Type:  defect                   |       Status:  new    
 Priority:  high                     |    Milestone:  3.1    
Component:  CherryPy code            |   Resolution:          
 Keywords:  on_error error handling  |  
-------------------------------------+------------------------------------- -
Comment (by guest):

 Patch:

 In lib.xmlrpc, change def on_error(): to...

 {{{

 def on_error(*args, **kwargs):

 }}}

--
Ticket URL: <http://www.cherrypy.org/ticket/836>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
CherryPy  
View profile
 More options Jul 5, 10:52 pm
From: CherryPy <t...@cherrypy.org>
Date: Sun, 06 Jul 2008 02:52:08 -0000
Local: Sat, Jul 5 2008 10:52 pm
Subject: Re: [CherryPy] #836: Can't raise exceptions over XMLRPC

#836: Can't raise exceptions over XMLRPC
-------------------------------------+------------------------------------- -
 Reporter:  guest                    |        Owner:  fumanchu
     Type:  defect                   |       Status:  closed  
 Priority:  high                     |    Milestone:  3.1    
Component:  CherryPy code            |   Resolution:  fixed  
 Keywords:  on_error error handling  |  
-------------------------------------+------------------------------------- -
Changes (by fumanchu):

  * resolution:  => fixed
  * status:  new => closed

Comment:

 Fixed in [2015]. Looks like it only worked when the user supplied no other
 tools.xmlrpc.* settings.

--
Ticket URL: <http://www.cherrypy.org/ticket/836>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google