Flask using Python


Recommended Posts


Has anyone managed to install Flask on their cPanel Web Hosting? I've been trying to install the Flask on my Hawk Host Shared Hosting using Python but I'm getting "500 Internal Error The server encountered an unexpected condition which prevented it from fulfilling the request." I've been following the exact guide from here: https://blog.ouseful.info/2016/09/17/creating-a-simple-python-flask-app-running-on-reclaim-hosting/



from flask import Flask
app = Flask(__name__)
application = app # our hosting requires application in passenger_wsgi

def hello():
return "This is Hello World!\n"

if __name__ == "__main__":



from myapp import application


I'd appreciate your help guys. 

Thank you!

Link to comment
Share on other sites

At this time you'd need to have our team look at the web server logs to determine why the Python application does not work.  We're working with the Litespeed team on a more elegant solution which will work similar to that of PHP's error_log file.  At this time though no estimate on when that'll be available but it is definitely something that will be coming as Python and Ruby applications become more popular on our shared web hosting they need ways to debug them without opening support tickets.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.