Plinth not starting in vagrant: Cannot import name 'watch_login'
Created by: JoKeyser
Hi, in a fresh vagrant image (but after one apt-get upgrade), I get the following error. Maybe there's a quick fix?
root@freedombox:/vagrant# ./run --debug
[2017-11-26 20:33:25,688] axes.watch_login INFO AXES: BEGIN LOG
[2017-11-26 20:33:25,689] axes.watch_login INFO AXES: Using django-axes 3.0.3
[2017-11-26 20:33:25,690] axes.watch_login INFO AXES: blocking by IP only.
[2017-11-26 20:33:25,691] axes.watch_login DEBUG AXES: Axes is configured to be behind reverse proxy
[2017-11-26 20:33:25,692] axes.watch_login DEBUG AXES: Looking for header value HTTP_X_FORWARDED_FOR
[2017-11-26 20:33:25,694] axes.watch_login DEBUG AXES: Number of proxies configured: 0 (please check this if you are using a custom header)
[2017-11-26 20:33:25,695] plinth.__main__ DEBUG Configured Django with applications - ['axes', 'captcha', 'bootstrapform', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.messages', 'stronghold', 'plinth', 'plinth.modules.apache', 'plinth.modules.avahi', 'plinth.modules.bind', 'plinth.modules.config', 'plinth.modules.datetime', 'plinth.modules.deluge', 'plinth.modules.diagnostics', 'plinth.modules.dynamicdns', 'plinth.modules.ejabberd', 'plinth.modules.firewall', 'plinth.modules.first_boot', 'plinth.modules.help', 'plinth.modules.ikiwiki', 'plinth.modules.infinoted', 'plinth.modules.jsxc', 'plinth.modules.letsencrypt', 'plinth.modules.matrixsynapse', 'plinth.modules.minetest', 'plinth.modules.monkeysphere', 'plinth.modules.mumble', 'plinth.modules.names', 'plinth.modules.networks', 'plinth.modules.openvpn', 'plinth.modules.pagekite', 'plinth.modules.power', 'plinth.modules.privoxy', 'plinth.modules.quassel', 'plinth.modules.radicale', 'plinth.modules.repro', 'plinth.modules.roundcube', 'plinth.modules.security', 'plinth.modules.snapshot', 'plinth.modules.ssh', 'plinth.modules.sso', 'plinth.modules.storage', 'plinth.modules.syncthing', 'plinth.modules.tahoe', 'plinth.modules.tor', 'plinth.modules.transmission', 'plinth.modules.ttrss', 'plinth.modules.upgrades', 'plinth.modules.users', 'plinth.modules.cockpit']
[2017-11-26 20:33:25,696] plinth.__main__ DEBUG Creating or adding new tables to data file
Operations to perform:
Apply all migrations: auth, axes, captcha, contenttypes, plinth
Running migrations:
No migrations to apply.
[2017-11-26 20:33:25,857] plinth.__main__ INFO Configuration loaded from file - /etc/plinth/plinth.config
[2017-11-26 20:33:25,858] plinth.__main__ INFO Script prefix - /plinth
[2017-11-26 20:33:25,862] py.warnings WARNING /usr/lib/python3/dist-packages/captcha/helpers.py:4: RemovedInDjango20Warning: Importing from django.core.urlresolvers is deprecated in favor of django.urls.
from django.core.urlresolvers import reverse
[2017-11-26 20:33:26,135] plinth.module_loader DEBUG No URLs for users
Traceback (most recent call last):
File "./run", line 21, in <module>
plinth.__main__.main()
File "/vagrant/plinth/__main__.py", line 376, in main
module_loader.include_urls()
File "/vagrant/plinth/module_loader.py", line 43, in include_urls
_include_module_urls(module_import_path, module_name)
File "/vagrant/plinth/module_loader.py", line 121, in _include_module_urls
r'', django.conf.urls.include((url_module, module_name)))]
File "/usr/lib/python3/dist-packages/django/conf/urls/__init__.py", line 50, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/vagrant/plinth/modules/users/urls.py", line 29, in <module>
from axes.decorators import watch_login
ImportError: cannot import name 'watch_login'