I'm new to Django and have been going through the Mozilla Tutorial using PyCharm on a Windows machine. While doing the Djangogirls tutorial and couple of weeks ago, I learned about PythonAnywhere and had the Djangogirls working on PythonAnywhere. I got rid of that web app and now I've trying to deploy Mozilla the same way - it's working on my Windows machine and I want to migrate it to PythonAnywhere. I'm following a step using pa_autoconfigure_django.py
and the command failing while running migrate database:
< Running migrate database >
\
~<:>>>>>>>>>
Traceback (most recent call last):
File "/home/pfuntner/pfuntner.pythonanywhere.com/manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/base.py", line 327, in execute
self.check()
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 62, in _run_checks
issues.extend(super(Command, self)._run_checks(**kwargs))
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/urls/resolvers.py", line 254, in check
for pattern in self.url_patterns:
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/urls/resolvers.py", line 405, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/site-packages/django/urls/resolvers.py", line 398, in urlconf_module
return import_module(self.urlconf_name)
File "/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
File "/home/pfuntner/pfuntner.pythonanywhere.com/locallibrary/urls.py", line 17, in <module>
from django.urls import path
ImportError: cannot import name 'path'
Traceback (most recent call last):
File "/home/pfuntner/.local/bin/pa_autoconfigure_django.py", line 56, in <module>
main(arguments['<git-repo-url>'], arguments['--domain'], arguments['--python'], nuke=arguments.get('--nuke'))
File "/home/pfuntner/.local/bin/pa_autoconfigure_django.py", line 43, in main
project.run_migrate()
File "/home/pfuntner/.local/lib/python3.6/site-packages/pythonanywhere/django_project.py", line 96, in run_migrate
'migrate',
File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '[PosixPath('/home/pfuntner/.virtualenvs/pfuntner.pythonanywhere.com/bin/python'), PosixPath('/home/pfuntner/pfuntner.pythonanywhere.com/manage.py'), 'migrate']' returned
non-zero exit status 1.
10:25 ~ $
How do I fix this?