Error when receiving some special kind of message
When sending a message from unverified conversation, but when the bot is still talking plain text, somehow this happened:
Feb 16 15:04:28 otrbot python[17155]: #033[41;37m[ERROR]#033[0m#033[31m#011sleekxmpp.xmlstream.xmlstream:#033[0m#011Error processing event handler: <bound method OtrBot.otr_event of <otrbot.core.client.OtrBot object at 0x7fc21b97c690>>#033[0m
Feb 16 15:04:28 otrbot python[17155]: Traceback (most recent call last):
Feb 16 15:04:28 otrbot python[17155]: File "/opt/otrbot/env/local/lib/python2.7/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 1710, in _event_runner
Feb 16 15:04:28 otrbot python[17155]: func(*args)
Feb 16 15:04:28 otrbot python[17155]: File "/opt/otrbot/otrbot/core/client.py", line 583, in otr_event
Feb 16 15:04:28 otrbot python[17155]: self._sessions[jid.bare].handle(event_type, data)
Feb 16 15:04:28 otrbot python[17155]: File "/opt/otrbot/otrbot/statemachine/statemachine.py", line 122, in handle
Feb 16 15:04:28 otrbot python[17155]: self._state = self._state.handle(event, *args, **kwargs)
Feb 16 15:04:28 otrbot python[17155]: File "/opt/otrbot/otrbot/statemachine/state.py", line 184, in handle
Feb 16 15:04:28 otrbot python[17155]: **kwargs
Feb 16 15:04:28 otrbot python[17155]: File "/opt/otrbot/otrbot/core/utils.py", line 158, in call_function
Feb 16 15:04:28 otrbot python[17155]: return function(*args)
Feb 16 15:04:28 otrbot python[17155]: File "/opt/otrbot/otrbot/core/state.py", line 228, in handle_message_received
Feb 16 15:04:28 otrbot python[17155]: self.check_secret_in_message(msg)
Feb 16 15:04:28 otrbot python[17155]: File "/opt/otrbot/otrbot/core/state.py", line 354, in check_secret_in_message
Feb 16 15:04:28 otrbot python[17155]: if secret in msg:
Feb 16 15:04:28 otrbot python[17155]: TypeError: 'in <string>' requires string as left operand, not NoneType
Feb 16 15:04:28 otrbot PID 17155 - sleekxmpp.xmlstream.xmlstream; ERROR: Error processing event handler: <bound method OtrBot.otr_event of <otrbot.core.client.OtrBot object at 0x7fc21b97c690>>#012Traceback (most recent call last):#012 File "/opt/otrbot/env/local/lib/python2.7/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 1710, in _event_runner#012 func(*args)#012 File "/opt/otrbot/otrbot/core/client.py", line 583, in otr_event#012 self._sessions[jid.bare].handle(event_type, data)#012 File "/opt/otrbot/otrbot/statemachine/statemachine.py", line 122, in handle#012 self._state = self._state.handle(event, *args, **kwargs)#012 File "/opt/otrbot/otrbot/statemachine/state.py", line 184, in handle#012 **kwargs#012 File "/opt/otrbot/otrbot/core/utils.py", line 158, in call_function#012 return function(*args)#012 File "/opt/otrbot/otrbot/core/state.py", line 228, in handle_message_received#012 self.check_secret_in_message(msg)#012 File "/opt/otrbot/otrbot/core/state.py", line 354, in check_secret_in_message#012 if secret in msg:#012TypeError: 'in <string>' requires string as left operand, not NoneType
Feb 16 15:04:28 otrbot PID 17155 - sleekxmpp.basexmpp; ERROR: 'in <string>' requires string as left operand, not NoneType#012Traceback (most recent call last):#012 File "/opt/otrbot/env/local/lib/python2.7/site-packages/sleekxmpp/xmlstream/xmlstream.py", line 1710, in _event_runner#012 func(*args)#012 File "/opt/otrbot/otrbot/core/client.py", line 583, in otr_event#012 self._sessions[jid.bare].handle(event_type, data)#012 File "/opt/otrbot/otrbot/statemachine/statemachine.py", line 122, in handle#012 self._state = self._state.handle(event, *args, **kwargs)#012 File "/opt/otrbot/otrbot/statemachine/state.py", line 184, in handle#012 **kwargs#012 File "/opt/otrbot/otrbot/core/utils.py", line 158, in call_function#012 return function(*args)#012 File "/opt/otrbot/otrbot/core/state.py", line 228, in handle_message_received#012 self.check_secret_in_message(msg)#012 File "/opt/otrbot/otrbot/core/state.py", line 354, in check_secret_in_message#012 if secret in msg:#012TypeError: 'in <string>' requires string as left operand, not NoneType