Forums

error in pa_autoconfigure_django.py

16:12 ~ $ pa_autoconfigure_django.py https://github.com/TrueTruffle/my-first-blog.git --branch --branch requires argument Usage: pa_autoconfigure_django.py <git-repo-url> [--branch=<branch> --domain=<domain> --python=<python-version>] [--nuke] 16:13 ~ $ pa_autoconfigure_django.py --nuke https://github.com/TrueTruffle/my-first-blog.git < Running API sanity checks > \ ~<:>>>>>>>>> Cloning into '/home/Truffle/truffle.pythonanywhere.com'... remote: Enumerating objects: 31, done. remote: Counting objects: 100% (31/31), done. remote: Compressing objects: 100% (25/25), done. remote: Total 31 (delta 1), reused 28 (delta 1), pack-reused 0 Unpacking objects: 100% (31/31), 6.38 KiB | 15.00 KiB/s, done. Traceback (most recent call last): File "/home/Truffle/.local/bin/pa_autoconfigure_django.py", line 54, in <module> nuke=arguments.get('--nuke') File "/home/Truffle/.local/bin/pa_autoconfigure_django.py", line 32, in main project.ensure_branch(branch), File "/home/Truffle/.local/lib/python3.6/site-packages/pythonanywhere/django_project.py", line 32, in ensure_branch "There are many branches in your repo. " pythonanywhere.exceptions.SanityException: There are many branches in your repo. You need to specify which branch to use by adding --branch=<branch> option to the comm and.

As the error message says: There are many branches in your repo. You need to specify which branch to use by adding --branch=<branch> option to the command

Run # Set up virtual environment directory # Set up virtual environment directory export WORKON_HOME=~/.virtualenvs

# Locate the Python script dynamically PA_AUTOCONFIGURE_SCRIPT=$(which pa_autoconfigure_django.py) PA_RELOAD_SCRIPT=$(which pa_reload_webapp.py)

# Execute the deployment script with the correct path and options "$PA_AUTOCONFIGURE_SCRIPT" https://github.com/Chaitanyabeemanaboina/E_commerce.git --branch=main --domain=Chaitanyabeemanaboina.pythonanywhere.com --python=3.10.8 --nuke --api-token=***

# Execute the webapp reload script with the correct domain and API token "$PA_RELOAD_SCRIPT" Chaitanyabeemanaboina.pythonanywhere.com --api-token=*** shell: /usr/bin/bash -e {0} env: pythonLocation: /opt/hostedtoolcache/Python/3.10.8/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.8/x64/lib PA_API_TOKEN: *** Usage: pa_autoconfigure_django.py <git-repo-url> [--branch=<branch> --domain=<domain> --python=<python-version>] [--nuke] Error: Process completed with exit code 1.

Where are you running this script?