fbchat-dev / fbchat-dev/fbchat
Can't create new poll option in `updatePollVote`
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 403
- PR merge metrics
- No merged PRs in 30d
Description
## Description of the problem
I wrote a little script that automatically votes on a poll some time ago. It was working perfectly, but I recently saw that it suddently doesn't.
## Code to reproduce
```py
# This works(of course if poll has some options):
self.updatePollVote(poll.uid, option_ids=[poll.options[0].uid])
# This doesn't:
self.updatePollVote(poll.uid, new_options=['New Option'])
```
## Traceback
```
Traceback (most recent call last):
File "/home/mateusz/.local/lib/python3.7/site-packages/fbchat/_client.py", line 2820, in _parse_message
self._parse_payload(topic, data)
File "/home/mateusz/.local/lib/python3.7/site-packages/fbchat/_client.py", line 2758, in _parse_payload
self._parseDelta(delta)
File "/home/mateusz/.local/lib/python3.7/site-packages/fbchat/_client.py", line 2515, in _parseDelta
msg=delta,
File "auto-voter.py", line 27, in onPollCreated
self.updatePollVote(poll.uid, option_ids=[], new_options=['New Option'])
File "/home/mateusz/.local/lib/python3.7/site-packages/fbchat/_client.py", line 1860, in updatePollVote
fb_error_message=j.get("errorMessage"),
fbchat._exception.FBchatFacebookError: Failed updating poll vote: None
```
## Environment information
- Python version - 3.7.4
- `fbchat` version - 1.9.6
I checked if I cant manually create new options (in case that was some weird-facebook-permission stuff). I can with no problem.
Contributor guide
Assessment
This issue has not been assessed yet.