localslackirc
localslackirc copied to clipboard
Parse polls
Traceback (most recent call last):
File "./irc.py", line 305, in <module>
main()
File "./irc.py", line 284, in main
sl_event = next(sl_events)
File "/home/salvo/dev/localslackirc/slack.py", line 352, in events_iter
previous=load(event['previous_message'], Message),
File "/usr/lib/python3/dist-packages/typedload/__init__.py", line 79, in load
return loader.load(value, type_)
File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 141, in load
return func(self, value, type_)
File "/usr/lib/python3/dist-packages/typedload/dataloader.py", line 210, in _namedtupleload
type_
ValueError: Value {'text': '', 'bot_id': 'XXXX', 'attachments': [{'fallback': 'Open Slack to cast your vote in this Simple Poll', 'title': 'How well', 'id': 1, 'color': '6ecadc', 'fields': [{'title': '', 'value': ':one: Awesome!\n\n\n', 'short': False}, {'title': '', 'value': ':two: Meh\n\n\n', 'short': False}, {'title': '', 'value': ':three: meh..\n\n\n', 'short': False}, {'title': '', 'value': ':four: It sucks\n\n\n', 'short': False}, {'title': '', 'value': ':five: No question asked!\n\n\n', 'short': False}], 'mrkdwn_in': ['fields']}, {'callback_id': 'c44a4eqwe342690b6fd2', 'fallback': 'Open Slack to cast your vote in this Simple Poll', 'id': 2, 'color': '6ecadc', 'actions': [{'id': '1', 'name': 'vote', 'text': ':one:', 'type': 'button', 'value': '1', 'style': ''}, {'id': '2', 'name': 'vote', 'text': ':two:', 'type': 'button', 'value': '2', 'style': ''}, {'id': '3', 'name': 'vote', 'text': ':three:', 'type': 'button', 'value': '3', 'style': ''}, {'id': '4', 'name': 'vote', 'text': ':four:', 'type': 'button', 'value': '4', 'style': ''}, {'id': '5', 'name': 'vote', 'text': ':five:', 'type': 'button', 'value': '5', 'style': ''}]}, {'callback_id': 'cwqed2', 'fallback': 'Open Slack to delete the Simple Poll you created.', 'id': 3, 'color': '6ecadc', 'actions': [{'id': '6', 'name': 'delete-v2', 'text': 'Delete Poll', 'type': 'button', 'value': '', 'style': 'danger', 'confirm': {'text': 'Are you sure you want to delete the Poll?', 'title': 'Delete Poll?', 'ok_text': 'Yes', 'dismiss_text': 'No'}}]}, {'callback_id': 'c1232', 'fallback': 'Open Slack to cast your vote in this Simple Poll', 'footer': 'Simple Poll <https://simplepoll.rocks/dashboard/qwe/settings/|Edit Settings>', 'id': 4, 'footer_icon': 'https://simplepoll.rocks/static/main/favicon.png', 'color': '6ecadc'}], 'type': 'message', 'subtype': 'bot_message', 'ts': '1525260740.000280', 'channel': 'XXX'} does not contain fields: {'user'} which are necessary for type <class 'slack.Message'>