As this error looked familiar to me, I stumbled across a previous very similar bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794847 This report stated that the error you reported might be linked to a problem in Python Twisted. May you please also tell us which version of python-twisted is installed on your system? The patch supplied was included upstream, so we'd need to investigate if this problem is not linked to the python-twisted version you use.
Cheers!