File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/util.py", line 59, in run
task(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 277, in __retrieve_updates
self.process_new_updates(updates)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 314, in process_new_updates
self.process_new_messages(new_messages)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 336, in process_new_messages
self._notify_command_handlers(self.message_handlers, new_messages)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 1489, in _notify_command_handlers
if self._test_message_handler(message_handler, message):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 1470, in _test_message_handler
if not self._test_filter(filter, filter_value, message):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 1484, in _test_filter
return test_cases.get(filter, lambda msg: False)(message)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 1480, in <lambda>
'commands': lambda msg: msg.content_type == 'text' and util.extract_command(msg.text) in filter_value,
TypeError: 'in <string>' requires string as left operand, not NoneType
"
Exception in thread PollingThread:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/util.py", line 59, in run
task(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 277, in __retrieve_updates
self.process_new_updates(updates)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 314, in process_new_updates
self.process_new_messages(new_messages)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 336, in process_new_messages
self._notify_command_handlers(self.message_handlers, new_messages)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 1489, in _notify_command_handlers
if self._test_message_handler(message_handler, message):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 1470, in _test_message_handler
if not self._test_filter(filter, filter_value, message):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 1484, in _test_filter
return test_cases.get(filter, lambda msg: False)(message)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 1480, in <lambda>
'commands': lambda msg: msg.content_type == 'text' and util.extract_command(msg.text) in filter_value,
TypeError: 'in <string>' requires string as left operand, not NoneType
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/util.py", line 65, in run
logger.error(type(e).__name__ + " occurred, args=" + str(e.args) + "\n" + traceback.format_exc())
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/logging/__init__.py", line 1361, in error
self._log(ERROR, msg, args, **kwargs)
с чем угодно
util.extract_command(msg.text) вернуло None
Обсуждают сегодня