Forums

Django girls tutorial -

I am up to the step "Django templates"

  • I was updating my "blog/templates/blog/post_list.html" like they said too but my blog was not changing on the server, so I went to the next step which was too go onto python anywhere and "git pull"
  • now my website does not work and it says Error code: Unhandled Exception...

does anyone know how to fix this?? I really want to be able to finish the tutorial

If you're getting that error, there will be messages in your error log which should help you to debug it. There's a link to the error log on the "Web" tab, and the most recent error will be at the bottom of the file. Take a look and see if it clarifies what the problem is -- if you can't work it out, post the error message here and we should be able to help.

Error running WSGI application 2018-10-05 11:54:54,446: File "/home/millyshelston/millyshelston.pythonanywhere.com/mysite/settings.py", line 124 2018-10-05 11:54:54,447: 2018-10-05 11:54:54,447: <<<<<<< HEAD 2018-10-05 11:54:54,448: 2018-10-05 11:54:54,448: ^ 2018-10-05 11:54:54,448: 2018-10-05 11:54:54,448: SyntaxError: invalid syntax 2018-10-05 11:54:54,449: File "/var/www/millyshelston_pythonanywhere_com_wsgi.py", line 15, in <module> 2018-10-05 11:54:54,449: application = get_wsgi_application() 2018-10-05 11:54:54,449: 2018-10-05 11:54:54,450: File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application 2018-10-05 11:54:54,450: django.setup(set_prefix=False) 2018-10-05 11:54:54,450: 2018-10-05 11:54:54,450: File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/init.py", line 19, in setup 2018-10-05 11:54:54,450: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) 2018-10-05 11:54:54,450: 2018-10-05 11:54:54,451: File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/conf/init.py", line 57, in getattr 2018-10-05 11:54:54,451: self._setup(name) 2018-10-05 11:54:54,451: 2018-10-05 11:54:54,451: File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/conf/init.py", line 44, in _setup 2018-10-05 11:54:54,451: self._wrapped = Settings(settings_module) 2018-10-05 11:54:54,451: 2018-10-05 11:54:54,452: File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/conf/init.py", line 107, in init 2018-10-05 11:54:54,452: mod = importlib.import_module(self.SETTINGS_MODULE) 2018-10-05 11:54:54,452: ******* 2018-10-05 11:54:54,452: If you're seeing an import error and don't know why, 2018-10-05 11:54:54,452: we have a dedicated help page to help you debug: 2018-10-05 11:54:54,453: https://help.pythonanywhere.com/pages/DebuggingImportError/ 2018-10-05 11:54:54,453: *******

that is the error

Error running WSGI application

File "/home/millyshelston/millyshelston.pythonanywhere.com/mysite/settings.py", line 124

<<<<<<< HEAD

^

SyntaxError: invalid syntax File "/var/www/millyshelston_pythonanywhere_com_wsgi.py", line 15, in <module> application = get_wsgi_application()

File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application django.setup(set_prefix=False)

File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/init.py", line 19, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)

File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/conf/init.py", line 57, in getattr self._setup(name)

File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/conf/init.py", line 44, in _setup self._wrapped = Settings(settings_module)

File "/home/millyshelston/.virtualenvs/millyshelston.pythonanywhere.com/lib/python3.6/site-packages/django/conf/init.py", line 107, in init mod = importlib.import_module(self.SETTINGS_MODULE)

Sorry that should be a bit easier to read - thats the error

You have left-overs from a partial git merge in your settings.py file. The first line of the traceback is pointing to the line where git has put the markers indicating what you need to merge. There may be other instances of similar merge markers in your code. You'll need to look at each of them and decide which of the versions you want to keep.

How do I decide which version to keep?

dont worry! I have figured out the issue :) thankyou for your help

I am currently doing the django girls tutorial too. Hence I decided to post here as well:

When I open a new Bash console on pythonanywhere I cannot type anything in there. In fact I do not even see anything except the name of the console and a white screen.

Can anybody help?

Use a different browser. Either your browser is not compatible with the PythonAnywhere console or one or more of your extensions is interfering.