Deploying a Django project - WSGI problem

Hi there,

I’m having some hard time with deploying the website on python anywhere as part of ‘Build python web apps with Django course’. If visit the site it says “Something went wrong” and the error log looks like this:

What confuses me, is there is no module mysite and line 17 in WSGI is blank. I changed the mysite and yourname, i tried the debugg site, but its dead end (for me).

I used the djangovet files from github, and I think I followed the instructions in the course guide. Can anyone help please? :wink:

I’d double-check that, then, because it’s certainly looking for something with that name. Given it’s in the boilerplate repo provided, I wonder whether a save didn’t go through or something.

Hi, thanks for your reply. I went through the setting up again and discovered, that the site is functional until i paste the following code to settings.py from the codecademy course:

KEYSDIR = str(BASE_DIR)+"/keys.json" with open(KEYSDIR) as k: project_keys = json.loads(k.read()) def getKey(setting,project_keys=project_keys): try: return project_keys[setting] except KeyError: errorMessage = "Set the {} env var".format(setting) raise ImproperlyConfigured(errorMessage)

After that, the site crashes with the problems I mentioned earlier. I figured, that the site may run even without this part of code - its about hiding the secretcode in keys.json and this code should call that key from json.

Can you please provide the contents of your WSGI file? This is the file which you’re asked to create/update in step 15, below: