fraschetti / Octoslack

OctoPrint plugin for Slack, Mattermost, Pushbullet, Pushover, Rocket.Chat, Discord, Riot/Matrix, & Microsoft Teams
MIT License
74 stars 34 forks source link

coercing to Unicode error #76

Closed tedder closed 4 years ago

tedder commented 4 years ago

I'm going to look and patch this, but I want to get the issue here so I can get it out of my paste buffer.

ERROR - Slack RTM message processing error: coercing to Unicode: need string or buffer, NoneType found
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_Octoslack/__init__.py", line 1877, in execute_rtm_loop
    self.process_rtm_message(slackAPIToken, msg)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_Octoslack/__init__.py", line 1981, in process_rtm_message
    elif alternate_bot_id in message_text:
TypeError: coercing to Unicode: need string or buffer, NoneType found
tedder commented 4 years ago

debugging shows these values:

bot_id: @U03FTJK82
message_text: (empty str)
alternate_bot_id: None
fraschetti commented 4 years ago

Hi @tedder

Let me know if you have a patch on the way, otherwise I'll try to tackle this while I'm working on a few other changes.

Thanks!

tedder commented 4 years ago

Thanks for the nudge. I put it up.