{'forward_from_chat': None, 'migrate_to_chat_id': None, 'invoice': None, 'text': u'1', 'sticker': None, 'from_user': {'username': u'bamboo_lee', 'first_name': u'bamboo', 'last_name': u'lee', 'is_bot': False, 'language_code': u'en', 'id': 471214291}, 'caption_entities': None, 'delete_chat_photo': None, 'migrate_from_chat_id': None, 'new_chat_members': None, 'video': None, 'left_chat_member': None, 'chat': {'username': None, 'first_name': None, 'last_name': None, 'description': None, 'title': u'123', 'photo': None, 'pinned_message': None, 'sticker_set_name': None, 'all_members_are_administrators': True, 'invite_link': None, 'type': u'group', 'id': -264835065, 'can_set_sticker_set': None}, 'group_chat_created': None, 'new_chat_photo': None, 'forward_date': None, 'entities': None, 'location': None, 'photo': None, 'author_signature': None, 'document': None, 'forward_from': None, 'supergroup_chat_created': None, 'edit_date': None, 'pinned_message': None, 'content_type': 'text', 'successful_payment': None, 'date': 1514370687, 'new_chat_member': None, 'voice': None, 'reply_to_message': None, 'venue': None, 'message_id': 159, 'caption': None, 'contact': None, 'channel_chat_created': None, 'video_note': None, 'audio': None, 'new_chat_title': None}
这不是json吗?为什么解析错误
2017-12-27 10:31:27,428 (util.py:64 WorkerThread1) ERROR - TeleBot: "TypeError occurred, args=('expected string or buffer',)
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/telebot/util.py", line 58, in run
task(*args, **kwargs)
File "/tmp/pycharm_project_812/main.py", line 19, in handle_messages
data = json.loads(message)
File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer
"
Traceback (most recent call last):
File "/tmp/pycharm_project_812/main.py", line 30, in
bot.polling()
File "/usr/lib/python2.7/site-packages/telebot/__init__.py", line 264, in polling
self.__threaded_polling(none_stop, interval, timeout)
File "/usr/lib/python2.7/site-packages/telebot/__init__.py", line 288, in __threaded_polling
self.worker_pool.raise_exceptions()
File "/usr/lib/python2.7/site-packages/telebot/util.py", line 107, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "/usr/lib/python2.7/site-packages/telebot/util.py", line 58, in run
task(*args, **kwargs)
File "/tmp/pycharm_project_812/main.py", line 19, in handle_messages
data = json.loads(message)
File "/usr/lib64/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer