Today, 12:14 AM
I am running a very simple HTML script on IIS 10.0 using Brython to communicate with a Python script.
HTML:
I still have a 500 Internal Server error:
I am unsure as to what I may have missed or have one wrong. Any help appreciated.
Thanks
HTML:
<html> <!-- Based on https://anvil.works/blog/python-in-the-browser-talk --> <head> <script src="pages/scripts/libz/brython-3.7.5.min.js"></script> </head> <body onload="brython(1)"> <script type="text/python" src="python_test.py"></script> <form> <input id="name-box" placeholder="Enter your name"> <button id="greet-button">Say Hello</button> </form> </body> </html>Python:
import document, alert def greet(event): alert("Hello " + document["name-box"].value + "!") document["greet-button"].bind("click", greet)I added Python as FastCGI module in my module mappings in IIS, and I also installed wfastcgi and included the path to its .exe within the module mapping and restarted IIS.
I still have a 500 Internal Server error:
Quote:Error occurred while reading WSGI handler:
Traceback (most recent call last):
File "C:\Python313\Lib\site-packages\wfastcgi.py", line 791, in main
env, handler = read_wsgi_handler(response.physical_path)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python313\Lib\site-packages\wfastcgi.py", line 633, in read_wsgi_handler
handler = get_wsgi_handler(os.getenv("WSGI_HANDLER"))
File "C:\Python313\Lib\site-packages\wfastcgi.py", line 586, in get_wsgi_handler
raise Exception('WSGI_HANDLER env var must be set')
Exception: WSGI_HANDLER env var must be set
StdOut:
StdErr:
I am unsure as to what I may have missed or have one wrong. Any help appreciated.
Thanks