Forums

two errors in my first github sync:

Hello, this is my first time doing any of this. I'm trying to follow a tutorial from Django Girls on how to push my code to Github and then how to host my app on Pythonanywhere. My app is different form the tutorials app, but I'm not sure what the problem is. On my first try here after running this command:

$ pa_autoconfigure_django.py --python=3.6 https://github.com/<your-github-username>/my-first-blog.git

I get a lot of successes, but then at the end there are two? errors. I copypasted the output bellow. Not sure what more to say, please advise!

   < Running collectstatic >
       \
        ~<:>>>>>>>>>
    Traceback (most recent call last):
      File "/home/sctilley/sctilley.pythonanywhere.com/manage.py", line 21, in <module>
        main()
      File "/home/sctilley/sctilley.pythonanywhere.com/manage.py", line 17, in main
        execute_from_command_line(sys.argv)
      File "/home/sctilley/.virtualenvs/sctilley.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/__init__.py", line 401,
     in execute_from_command_line
        utility.execute()
      File "/home/sctilley/.virtualenvs/sctilley.pythonanywhere.com/lib/python3.6/site-packages/django/core/management/__init__.py", line 377,
     in execute
        django.setup()
      File "/home/sctilley/.virtualenvs/sctilley.pythonanywhere.com/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
        apps.populate(settings.INSTALLED_APPS)
      File "/home/sctilley/.virtualenvs/sctilley.pythonanywhere.com/lib/python3.6/site-packages/django/apps/registry.py", line 91, in populate
        app_config = AppConfig.create(entry)
      File "/home/sctilley/.virtualenvs/sctilley.pythonanywhere.com/lib/python3.6/site-packages/django/apps/config.py", line 90, in create
        module = import_module(entry)
      File "/home/sctilley/.virtualenvs/sctilley.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 994, in _gcd_import
      File "<frozen importlib._bootstrap>", line 971, in _find_and_load
      File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'crispy_forms'
    Traceback (most recent call last):
      File "/home/sctilley/.local/bin/pa_autoconfigure_django.py", line 52, in <module>
        main(arguments['<git-repo-url>'], arguments['--domain'], arguments['--python'], nuke=arguments.get('--nuke'))
      File "/home/sctilley/.local/bin/pa_autoconfigure_django.py", line 42, in main
        project.run_collectstatic()
      File "/home/sctilley/.local/lib/python3.6/site-packages/pythonanywhere/django_project.py", line 87, in run_collectstatic
        '--noinput',
      File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/home/sctilley/.virtualenvs/sctilley.pythonanywhere.com/bin/python', '/home/sctilley/sctilley.py
    thonanywhere.com/manage.py', 'collectstatic', '--noinput']' returned non-zero exit status 1.

You;re trying to use a module in your app that you have not included in your requirements.txt. Make sure all the packages that you need are in your requirements.txt.