Forums

Error in running pa_autoconfigure_django.py https://github.com/sumitkhajanchi/my-first-blog.git

Hi All, I got below error when trying to execute command : pa_autoconfigure_django.py https://github.com/sumitkhajanchi/my-first-blog.git

Below are snippet from the pythonanywhere command line :

17:41 ~ $ pa_autoconfigure_django.py https://github.com/sumitkhajanchi/my-first-blog.git

< Running API sanity checks > \ ~<:>>>>>>>>> Traceback (most recent call last): File "/home/SumitKhajanchi/.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/SumitKhajanchi/.local/bin/pa_autoconfigure_django.py", line 34, in main project.sanity_checks(nuke=nuke) File "/home/SumitKhajanchi/.local/lib/python3.6/site-packages/pythonanywhere/project.py", line 22, in sanity_checks self.webapp.sanity_checks(nuke=nuke) File "/home/SumitKhajanchi/.local/lib/python3.6/site-packages/pythonanywhere/api.py", line 74, in sanity_checks raise SanityException(f'You already have a webapp for {self.domain}.\n\nUse the --nuke option if you want to replace it.') pythonanywhere.exceptions.SanityException: You already have a webapp for sumitkhajanchi.pythonanywhere.com

And it is not activating the virtual env automatically. Please help.

Read the exception: "You already have a webapp for sumitkhajanchi.pythonanywhere.com". The script is not going to destroy it if you don't give it the --nuke option.

Daaahh. Same happened to me. Thank you so much. I read it like 10 times but I did not actually read it.

:D

            / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄\
<<<<<<:>~  <   Yay!          |
             \_________/

where should i give the nuke option

something like this: pa_autoconfigure_django.py --nuke https://github.com/sumitkhajanchi/my-first-blog.git

Same happened to me. Thank you so much.

Glad we could help :-)

Thank you so much

so should i continue with command line of creating an admin user

can you give more details about what you are trying to do?

how will apply the nuke option?

Perhaps you could let us know exactly what error message you're getting when you run the script?

[edited by admin: formatting]

14:06 ~ $ pa_autoconfigure_django.py --nuke  https://github.con/KapisK
ay/the_scribe.git                                                     
< Running API sanity checks >
   \
    ~<:>>>>>>>>>
Cloning into '/home/Konadu/konadu.pythonanywhere.com'...
fatal: unable to access 'https://github.con/KapisKay/the_scribe.git/':
 Received HTTP code 403 from proxy after CONNECT
Traceback (most recent call last):
  File "/home/Konadu/.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/Konadu/.local/bin/pa_autoconfigure_django.py", line 35, 
in main
    project.download_repo(repo_url, nuke=nuke),
  File "/home/Konadu/.local/lib/python3.6/site-packages/pythonanywhere
/django_project.py", line 16, in download_repo
    subprocess.check_call(['git', 'clone', repo, str(self.project_path
)])
  File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'clone', 'https://gith
ub.con/KapisKay/the_scribe.git', '/home/Konadu/konadu.pythonanywhere.c
om']' returned non-zero exit status 128.

you most likely mean github.com, not github.con

@conrad: You God you!

Thanks

how can i host my second web app in pythonanywhere? I have created second virtual env but when I am uploading source code, it is showing the same error.

There are multiple errors in this thread. Which one are you getting?

yeah, actually I do not know the procedure of how to host my second website here its actually showing use nuke every time.

I removed everything. my doubt is simple, I want to know the procedure of how to host a second website in pythonanywhere?

If it's showing that you need to nuke the web app, then you're trying to create a web app at the address of a web app that you already have. A new web app needs a new address.

what is the new address?

You can either use <some string>-<username>.pythonanywhere.com (for example: test-lincolnstep.pythonanywhere.com) or you can use a domain that you already own. See http://help.pythonanywhere.com/pages/CustomDomains/

(0dminnimda.pythonanywhere.com) 15:30 ~/0dminnimda.pythonanywhere.com $ pa_autoconfigure_django.py --nuke https://github.com/0dminnimda/site.git < Running API sanity checks > \ ~<:>>>>>>>>> fatal: Could not get current working directory: No such file or directory Traceback (most recent call last): File "/home/0dminnimda/.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/0dminnimda/.local/bin/pa_autoconfigure_django.py", line 35, in main project.download_repo(repo_url, nuke=nuke), File "/home/0dminnimda/.local/lib/python3.7/site-packages/pythonanywhere/django_project.py", line 16, in download_repo subprocess.check_call(['git', 'clone', repo, str(self.project_path)]) File "/usr/lib/python3.7/subprocess.py", line 328, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['git', 'clone', 'https://github.com/0dminnimda/site.git', '/home/0dminnimda/0dminnimda.pythonanywhere.com']' returned non-zero exit status 128.

You are running the script from inside the directory that it's trying to work on. Try running it from your home directory.