Forums

I can't get my website running.

Hello staff team of the lovely site PythonAnyWhere, I've been working recently on my project locally, and I thought to my self it might be more comfortable having SSL & HTTPs already and all that jazz, hence why I moved it on to this platform.

My backend is Flask based which is what I uploaded on to here. I've uploaded my project & created a matching MySQL database for it, yet it doesn't run. Not a single route works... and I don't see any errors in the various logs. (Perhaps I'm looking in the wrong place?)

Please help me get this sorted, Thanks in advance, Niv Mamadov.

I see some errors in your web app's error logs -- where were you checking them? You'll find links to log files on the Web app page.

Okay yeah I got it, it says flask_cors is not found, yet I did pip install it and it's a valid package, any help?

How did you install it? Mind that there are multiple versions of Python (and pip respectively) installed which may be confusing at the beginning. See this help page: https://help.pythonanywhere.com/pages/InstallingNewModules/.

Okay I got all my packages installed, now I've got a different problem, please instead of this back and fourth ping pong, if you know the solution you have full permission to my files.

I have a piece of code that runs to check if my SQL works alright, and it returns that it isn't. (Maintenance Mode) https://ibb.co/xj6w02P

I've configured the SQL details like the following in my code:

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://USER:PASS@HOST/DB_NAME

All details were filled according to the SQL page in the control panel, please help me sort this one out so I can continue you working, thank you so very much in advance.

You're catching the exception and preventing it to be exposed in the error log -- maybe add a print of that exception traceback, so you know what actually failed.

I'm stupid brother, thanks for your help. Problem SOLVED!

(It's all about these packages... I didn't install pymysql apperantly, even though I had requirements.txt to do the whole thing...)

Glad to hear that you made it work!