When I try to execute a cgi script (via a localhost), I get the following error
OSError: [WinError 193] %1 is not a valid Win32 application
Any ideas why ??
Completely lost...
.
Additional Information:
The localhost is generated by the following
python -m http.server --cgi 8000
The cgi script is called by an ajax 'get' request (simplified)
ajax({
type: "GET",
url: "cgi-bin/myScript.cgi",
onSuccess: function(html){
//do stuff
}
});
I have tested to check whether it's the contents of the cgi script causing this and I am convinced it's not the problem. For instance, if I try to execute an empty 'myScript.cgi' in the manner above, I still get the error.
Also, the cgi script (written in python) works fine when run through the command line.