Anthony Webb
Anthony Webb

Reputation: 1351

Error running twisted application

I am trying to run a simple twisted application echo bot that metajack blogged about, everything looks like it is going to load fine, but at the very end I get an error:

2009/07/12 15:46 -0600 [-] ImportError: cannot import name toResponse
2009/07/12 15:46 -0600 [-] Failed to load application: cannot import name toResponse

Any ideas on what might be causing this?

I've not played with wokkel/twisted/python at all and dont know where to start to look.

It is worth nothing that I've tried another wokkel/twisted app and got this very same error.

Upvotes: 1

Views: 852

Answers (2)

Anthony Webb
Anthony Webb

Reputation: 1351

This error is caused because I have an outdated version of Twisted. Off to find a way to update twisted itself as the installer doesnt seem to be doing the trick.

Upvotes: 2

RichieHindle
RichieHindle

Reputation: 281375

There's not really enough information to go on, but if I had to guess, I'd say that you've given your program the same name as one of the modules that it relies on. Try renaming it to anthonys_echo_bot.py and re-running it. Do this:

rm *.pyc

in the directory in which you're running it first.

If that doesn't help, you'll need to track down the piece of code that's trying import toResponse - is that all the error you get? No traceback, pointing to lines of code?

Upvotes: 1

Related Questions