[Twisted-Python] "Failure: exceptions.TypeError: exceptions must be classes, instances, or strings..."
I'm running an xmlrpc server, frozen with py2exe. I'm getting an error message in the log file that reads:
2008/07/02 18:14 -0700 [-] Unhandled Error Traceback (most recent call last): Failure: exceptions.TypeError: exceptions must be classes, instances, or strings (deprecated), not type
... and that's it: no traceback, no line number, no indication where the problem occured. (I'm running Twisted 2.5.0, if it makes a difference.) Any idea what I can do to make it be a bit more informative? Thanks, -- Don Dwiggins Advanced Publishing Technology
On Thu, Jul 3, 2008 at 11:44 AM, Don Dwiggins
I'm running an xmlrpc server, frozen with py2exe. I'm getting an error message in the log file that reads:
2008/07/02 18:14 -0700 [-] Unhandled Error Traceback (most recent call last): Failure: exceptions.TypeError: exceptions must be classes, instances, or strings (deprecated), not type
... and that's it: no traceback, no line number, no indication where the problem occured. (I'm running Twisted 2.5.0, if it makes a difference.) Any idea what I can do to make it be a bit more informative?
Run it with Deferred.debug set to True. That'll give you more information about the source of the error. You might need to work with an unfrozen version here—I don't know for sure though. For what it's worth, "Unhandled Error" means that a Deferred has failed somewhere in its chain and there is no errback to handle that failure. jml
Jonathan Lange wrote:
Run it with Deferred.debug set to True. That'll give you more information about the source of the error. You might need to work with an unfrozen version here—I don't know for sure though.
For what it's worth, "Unhandled Error" means that a Deferred has failed somewhere in its chain and there is no errback to handle that failure.
Thanks for the reply; I'll pursue it. I'd like to dig a bit deeper into the reason for the missing traceback, though. I had a similar "exceptions must be classes" message a while back, and fixed it by changing Failure.raiseException in failure.py to raise self.__class__ rather than self.type. That at least caused the original reason for the exception to be shown. Also, that change is still in place in the frozen exe (assuming py2exe worked correctly), so something else is going on here. Any ideas? -- Don Dwiggins Advanced Publishing Technology
participants (2)
-
Don Dwiggins
-
Jonathan Lange