[Twisted-Python] Location of remote errors with PB

Hello, my app uses twisted.pb to communicate across its parts. Is there any way a caller can find out the whole traceback rather than just the description( eg "*global name 'true' is not defined*"?) This is so I can have help debugging. Thanks Si -- Linux Counter: User# 424693

When you create your server factory, you can optionally pass in a parameter called unsafeTracebacks=True. This will give the client the whole traceback I believe. client_factory = pb.PBServerFactory(p, unsafeTracebacks=True) I think it's called unsafe because it can potentially reveal quite a bit information about your server, someone correct me if I'm wrong though :-) Cheers, Yi http://yiqiang.org On Tue, Apr 22, 2008 at 6:11 AM, Simon Pickles <sipickles@hotmail.com> wrote:
Hello,
my app uses twisted.pb to communicate across its parts.
Is there any way a caller can find out the whole traceback rather than just the description( eg "*global name 'true' is not defined*"?)
This is so I can have help debugging.
Thanks
Si
-- Linux Counter: User# 424693
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Yi Qiang wrote:
When you create your server factory, you can optionally pass in a parameter called unsafeTracebacks=True. This will give the client the whole traceback I believe.
client_factory = pb.PBServerFactory(p, unsafeTracebacks=True)
Thanks Yi, I hadn't clocked that. After it ran with PBServerFactory, I checked the docs for PBClientFactory which claim to have a similar parameter for __init__ So I did this with my inherited class: class pbFactory(pb.PBClientFactory): def __init__(self, name, signOn): self.name = name self.DoSignOn = signOn pb.PBClientFactory.__init__(self, unsafeTracebacks = True) But got this: pb.PBClientFactory.__init__(self, unsafeTracebacks = True) exceptions.TypeError: __init__() got an unexpected keyword argument 'unsafeTracebacks' I guess I should post a ticket about this? First time for everything! Thanks Si -- http://www.squirtual-reality.com -------------------------------- Linux user #458601 - http://counter.li.org.

On Tue, 22 Apr 2008 18:48:43 +0100, Simon Pickles <sipickles@hotmail.com> wrote:
[snip]
But got this:
pb.PBClientFactory.__init__(self, unsafeTracebacks = True) exceptions.TypeError: __init__() got an unexpected keyword argument 'unsafeTracebacks'
I guess I should post a ticket about this?
First time for everything!
Are you using Twisted 2.5? unsafeTracebacks wasn't a parameter to PBClientFactory.__init__ in 2.5, though you can still set it as an attribute on an instance to achieve that effect. Twisted 8.0 adds that parameter to __init__, and the API documentation currently on the website is for Twisted 8.0. Jean-Paul

On Tue, 2008-04-22 at 08:08 -0700, Yi Qiang wrote:
When you create your server factory, you can optionally pass in a parameter called unsafeTracebacks=True. This will give the client the whole traceback I believe.
client_factory = pb.PBServerFactory(p, unsafeTracebacks=True)
I think it's called unsafe because it can potentially reveal quite a bit information about your server, someone correct me if I'm wrong though :-)
Cheers, Yi
On Tue, Apr 22, 2008 at 6:11 AM, Simon Pickles <sipickles@hotmail.com> wrote:
Hello,
my app uses twisted.pb to communicate across its parts.
Is there any way a caller can find out the whole traceback rather than just the description( eg "*global name 'true' is not defined*"?)
This is so I can have help debugging.
Thanks
Si
-- Linux Counter: User# 424693
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python -- George Pauly Ring Development www.ringdevelopment.com

Hi, Out of curiosity, are there plans to update the Ubuntu Repositories with v8? It is still at 2.5.0 I was having trouble building the latest version since Hardy is missing the python-dev package at present. Thanks Si -- http://www.squirtual-reality.com -------------------------------- Linux user #458601 - http://counter.li.org.

On Tue, 22 Apr 2008 19:08:13 +0100, Simon Pickles <sipickles@hotmail.com> wrote:
Hi,
Out of curiosity, are there plans to update the Ubuntu Repositories with v8? It is still at 2.5.0
I was having trouble building the latest version since Hardy is missing the python-dev package at present.
We don't build the Debian/Ubuntu packages for Twisted. You probably need to ask the Debian maintainer. Jean-Paul

Jean-Paul Calderone wrote:
On Tue, 22 Apr 2008 19:08:13 +0100, Simon Pickles <sipickles@hotmail.com> wrote:
Out of curiosity, are there plans to update the Ubuntu Repositories with v8? It is still at 2.5.0
I was having trouble building the latest version since Hardy is missing the python-dev package at present.
We don't build the Debian/Ubuntu packages for Twisted. You probably need to ask the Debian maintainer.
Perhaps the easiest way to find these folks is to check the Maintainer and Original-Maintainer fields; $ apt-cache search twisted python-twisted - Event-based framework for internet applications (transitional package) python-twisted-bin - Event-based framework for internet applications ... ... $ apt-cache show python-twisted Package: python-twisted Priority: extra Section: python Installed-Size: 60 Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Matthias Klose <doko@debian.org> Architecture: all Source: twisted Version: 2.5.0-2build1 Depends: python-twisted-core (>= 2.5), python-twisted-conch (>= 1:0.8), python-twisted-mail (>= 0.4), python-twisted-lore (>= 0.2), python-twisted-names (>= 0.4), python-twisted-news (>= 0.3), python-twisted-runner (>= 0.2), python-twisted-web (>= 0.7), python-twisted-words (>= 0.5) Filename: pool/main/t/twisted/python-twisted_2.5.0-2build1_all.deb Size: 8958 MD5sum: e97b408484713fc1692b623824f61117 SHA1: 4f329a3c9bd020044ca64bb7d0b5f5fbe8ed34b9 SHA256: d7bb08cba2978d4aafea6a0822b9d7b7abcaf74ce6cdf011b54d34d52f322bac Description: Event-based framework for internet applications (transitional package) This is a transitional package that depends on the twisted core library and all the libraries split out to separate packages starting with Twisted-2.0.1. Python-Version: all Bugs: mailto:ubuntu-users@lists.ubuntu.com Origin: Ubuntu regards, Kim
participants (5)
-
George Pauly
-
Jean-Paul Calderone
-
Kim Hawtin
-
Simon Pickles
-
Yi Qiang