Forums

vsearch4web: head first webapp does not appear

I've followed the instructions in Head First Python to "Deploying Your Webapp". When I try to display my webapp in the browser, the button greys out, a few seconds elapse and then the button is active again. The app is not displayed.

The error log is empty. The other two logs do not contain any messages that indicate a problem (afaik).

I've tried it in Chromium, Brave and Firefox. All return the same result.

My OS is Ubuntu 20.04.

The config file contains this:

<pre><code># This file contains the WSGI configuration required to serve up your

web application at http://<your-username>.pythonanywhere.com/

It works by setting the variable 'application' to a WSGI handler of some

description.

The below has been auto-generated for your Flask project

import sys

add your project directory to the sys.path

project_home = '/home/samstone/mysite' if project_home not in sys.path: sys.path = [project_home] + sys.path

import flask app but need to call it "application" for WSGI to work

from vsearch4web import app as application # noqa</code></pre>

Can anyone help, please?

Your site appears to be working and, when I click on the "Do it!" button, it takes me to a different page with resutls.

Hi, thanks for the answer.

I don't even get to the page with the "Do it!" button. I click on "Reload samstone.pythonanywhere.com", expecting to be taken to relevant page, but nothing happens. And it doesn't log any error messages.

However, accessing the url directly, does show that it works, so thank you for that.

When you click reload you just reload your code. You have to go to the page that's what Glenn did and you did and it works.

Hi, thanks.

Yeah I hadn't realised that before.

Glad to hear that it helped you!