Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example chat.py crashes on message.reply() #62

Closed
vampjaz opened this issue May 10, 2014 · 2 comments
Closed

Example chat.py crashes on message.reply() #62

vampjaz opened this issue May 10, 2014 · 2 comments

Comments

@vampjaz
Copy link

vampjaz commented May 10, 2014

I have been able to get the chat.py example working, with one small problem. I tried sending my bot "!!/random", and it crashes:

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/ubuntu/tardisbot/ChatExchange/chatexchange/browser.py", line 272, in _runner
    self.on_activity(activity)
  File "/home/ubuntu/tardisbot/ChatExchange/chatexchange/wrapper.py", line 243, in on_activity
    on_event(event, self)
  File "main.py", line 56, in on_message
    message.reply(str(random.random()))
AttributeError: 'MessagePosted' object has no attribute 'reply'

I think this is due to the program returning a MessagePosted object, in stead of a Message object, which has a reply method.

Manishearth added a commit that referenced this issue May 10, 2014
Fix git add examples/chat.py/random in examples (fixes #62)
@vampjaz
Copy link
Author

vampjaz commented May 10, 2014

It still crashes...

@vampjaz
Copy link
Author

vampjaz commented May 10, 2014

Nevermind!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant