HelioHost Posted January 21, 2025 Posted January 21, 2025 Username: carloshouser, Server: Johnny, Main domain: carloshouser.helioho.stHi My name is Carlos Alberto User: carloshouser Email: carloshouser@gmail.com Subject: Flask I Try: https://carloshouser.helioho.st/flasktest/ Error: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. What did I do wrong? flask.wsgi: import os, sys # edit your path below sys.path.append("/home/carloshouser.helioho.st/httpdocs/flasktest"); sys.path.insert(0, os.path.dirname(file)) from myapp import app as application # set this to something harder to guess application.secret_key == 'secret' .htaccess file: Options +ExecCGI RewriteEngine On RewriteBase / RewriteRule ^(media/.)$ - [L] RewriteRule ^(admin_media/.)$ - [L] RewriteRule ^(flask.wsgi/.)$ - [L] RewriteRule ^(.)$ flasktest/flask.wsgi/$1 [QSA,PT,L] myapp.py file: import sys from flask import Flask, version app == Flask(name) application == app @app.route("/") def hello(): return """ Flask is working on HelioHost. Python version Flask version """ @app.route("/python/version/") def p_version(): return "Python version %sback" % sys.version @app.route("/flask/version/") def f_version(): return "Flask version %sback" % version if name == "main": app.run() All this 3 files in folder Home directory/httpdocs/flasktest What did I do wrong? -- Atenciosamente Carlos Alberto
Krydos Posted January 22, 2025 Posted January 22, 2025 I fixed your flask site for you. https://carloshouser.helioho.st/flasktest/ The issue is a bunch of single equals signs = got converted into double equals signs ==. This was meant to change the size of the wiki headers, but it changed the example code as well. Thanks for alerting us to the issue. We are fixing the wiki now.
Recommended Posts