Debugging Twisted Matrix networking code

January 24, 2011

Debugging Twisted code is an exercise in lateral thinking. The error messages and exceptions can be opaque, especially when code wrapped inside a Deferred fails. When you get an unhandled error inside a Deferred, check your code for basic errors: parameter mismatches, references to undefined variables, or unimported types or modules etc. And where you’re deriving from a Twisted base class, check that you’re not accidently overriding a member variable. For instance, don’t have a member variable called ‘clients’ !

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s