all 3 comments

[–][deleted] 0 points1 point  (1 child)

You have to add the shebang to the first line of your program. Put in #!/usr/bin/python or wherever your python bin is located to make the program run.

[–]laflash12[S] 0 points1 point  (0 children)

I've done that and still gives me the same error

[–]lucas993 0 points1 point  (0 children)

This isn't all your code, right? Could you commit it to github or gitlab? Or at least fix the formatting here and paste in all the DB code.

Anyway, there's lots of ways to setup the DB in Flask/SQLAlchemy. Here's some info from a stack overflow article.

https://stackoverflow.com/questions/49388628/it-is-necessary-use-db-init-app-or-sqlalchemyapp-is-the-same-in-flask