scrapinghub / slackbot

A chat bot for Slack (https://slack.com).
MIT License
1.26k stars 394 forks source link

@default_handler falls with excpetion #127

Closed evasyuk closed 7 years ago

evasyuk commented 7 years ago

Traceback (most recent call last): File "/Library/Python/2.7/site-packages/slackbot/dispatcher.py", line 55, in _dispatch_msg_handler func(Message(self._client, msg), *args) TypeError: default_handler() takes exactly 2 arguments (1 given)

It was working when I tried "Hello, ping!" few days ago, but after finishing real logic implementation I got that error.

I have no idea why do I have this problem, but it would be very nice if someone would help to handle this problem!

lins05 commented 7 years ago

Can you show your code snippet for your default handler function?

evasyuk commented 7 years ago

Sorry, my bad - the problem was in the way I've tried to use decorators: they was used inside the custom wrapper class(but has to be only decorator for dedicated methods in the file without any class-wrappers)