Closed Gultak closed 4 years ago
What exact versions do you use? Still works here with:
$ python -V
Python 2.7.17
$ pip install -r requirements.txt
Requirement already satisfied: selenium>=2.3 in ./venv/lib/python2.7/site-packages (from -r requirements.txt (line 1)) (3.141.0)
Requirement already satisfied: argparse in /usr/lib/python2.7 (from -r requirements.txt (line 2)) (1.2.1)
Requirement already satisfied: pyvirtualdisplay in ./venv/lib/python2.7/site-packages (from -r requirements.txt (line 3)) (0.2.1)
Requirement already satisfied: urllib3 in ./venv/lib/python2.7/site-packages (from selenium>=2.3->-r requirements.txt (line 1)) (1.24.1)
Requirement already satisfied: EasyProcess in ./venv/lib/python2.7/site-packages (from pyvirtualdisplay->-r requirements.txt (line 3)) (0.2.5)
$ python autologin.py --verbose --browser firefox --headless
2020-05-29 17:49:55,938 >>> DEBUG: afraid-autologin startup
2020-05-29 17:49:55,940 >>> DEBUG: init virtual display
2020-05-29 17:49:56,065 >>> DEBUG: init browser
2020-05-29 17:50:04,259 >>> DEBUG: navigating to login page
2020-05-29 17:50:09,011 >>> DEBUG: submit login form
2020-05-29 17:50:10,544 >>> DEBUG: extending account if dormant
[...]
Works again since October 2019 - sorry, forgot to close the issue.
/etc/cron.monthly/afraid-autologin: Traceback (most recent call last): File "autologin.py", line 2, in
from selenium import webdriver
File "/root/afraid-autologin/venv/local/lib/python2.7/site-packages/selenium/webdriver/init.py", line 18, in
from .firefox.webdriver import WebDriver as Firefox # noqa
File "/root/afraid-autologin/venv/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 29, in
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
File "/root/afraid-autologin/venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 21, in
import copy
File "/usr/lib/python2.7/copy.py", line 52, in
import weakref
File "/usr/lib/python2.7/weakref.py", line 14, in
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
run-parts: /etc/cron.monthly/afraid-autologin exited with return code 1
Seems like an update to Phthon broke your tool...