Search code examples
pythonpython-2.7methodstwisted

Method call resolves as function call on a class


I have python2.7 and twistd framework. I am using twisted-theseus==0.14.1.3 library.

I have following as first two lines in my twistd plugin:

from theseus import Tracer

t = Tracer()
t.install()

I fail with exception:

exceptions.TypeError: install() takes exactly one argument (0 given)

What is wrong here? Looks like it was called install() not on the object receiver but on the class.


Solution

  • This appears to be due to a known issue with twisted-theseus: https://github.com/habnabit/twisted-theseus/issues/1.

    There is a workaround on the Github issue:

    $ pip install cython
    $ git clone https://github.com/habnabit/twisted-theseus
    $ cd twisted-theseus
    $ pip install .