File "~/main.py", line 51, in <module>
bot_vote()
File "~/main.py", line 23, in bot_vote
with TorBrowserDriver(PATH, headless=True, tbb_logfile_path='/dev/null') as driver:
File "~/.venv/lib/python3.9/site-packages/tbselenium/tbdriver.py", line 59, in __init__
options.set_headless()
AttributeError: 'Options' object has no attribute 'set_headless'
At line 59 it raises an AttributeError, I could solve it by changing line 58 and 59 to this:
options.headless = headless
Apparently it has changed? I'm using selenium 4.1.0, and seeking into headless it is using property, and has a setter function.
@headless.setter
def headless(self, value: bool):
"""
Sets the headless argument
Args:
value: boolean value indicating to set the headless option
"""
if value:
self._arguments.append('-headless')
elif '-headless' in self._arguments:
self._arguments.remove('-headless')
At line 59 it raises an AttributeError, I could solve it by changing line 58 and 59 to this:
options.headless = headless
Apparently it has changed? I'm using selenium 4.1.0, and seeking into headless it is using property, and has a setter function.