dimanche 19 avril 2015

Python flask app not working

here is the site: http://ift.tt/1cEdyMo


There are several pages, some work, some don't. The root page (/) returns an error. The /welcome page works. The /login page works, but when you click to login it returns an error. The /logout page works. I think that's it.


Here's the github repo for the site: http://ift.tt/1CVDs4h


The error only started occurring after I added the sqlite. I followed the discover flask Youtube tutorial through number 5 and don't know where I went wrong (i don't have enough rep to post the link for that)


Here is the error log:


2015-04-17 21:48:49,514 :Exception on / [GET] Traceback (most recent call last): File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.4/dist-packages/flask/_compat.py", line 33, in reraise raise value File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.4/dist-packages/flask/app.py", line 1461, in dispatch_request return self.view_functionsrule.endpoint File "/home/davidf/mysite/flask_app.py", line 14, in wrap return f(args, **kwargs) File "/home/davidf/mysite/flask_app.py", line 24, in home cur = g.db.execute('select * from posts') sqlite3.OperationalError: no such table: posts


If someone would be able to do a teamviewer with me for a couple of minutes to see where I went wrong that would really help me out. Thanks!


Aucun commentaire:

Enregistrer un commentaire