Milkdrop / strawpoll-bot

A Python3 Bot for voting unlimited times on a strawpoll.me poll.
GNU General Public License v2.0
31 stars 21 forks source link

Problem #7

Closed KatzeMau closed 3 years ago

KatzeMau commented 3 years ago

Connecting to: https://www.strawpoll.me/4eeexbx Traceback (most recent call last): File "script.py", line 146, in prepare (args, motd) File "script.py", line 83, in prepare checkboxID = str (int (checkboxID) + opt - 1) ValueError: invalid literal for int() with base 10: '' root@Rasp:/home/pi/strawpoll-bot#

Steccah commented 3 years ago

very strange, a strawpoll id is always an integer, not a string like yours

duranaaron commented 3 years ago

I have the same problem!

samr042 commented 3 years ago

Short: You're probably trying to use the ID of a strawpoll.com poll instead of a strawpoll.me poll.

Long: Because of this the poll can't be found and the code in lines 79-82 result in an empty string (in the checkboxID variable). It's trying to find field-options- and their value= on the page/source code, but they do not exist since the poll does not exist. Line 83 tries to make an integer of this string, but an empty string cannot be an integer, hence the ValueError.

Milkdrop commented 3 years ago

Indeed, that problem should appear only when you try voting on strawpoll.com instead of strawpoll.me.