Jump to content

Recommended Posts

Posted

I cannot run Python scripts on HelioHost at my URL http://benesolutions.heliohost.org/cgi-bin/test.py.

 

It is a simplest script with the following content:

 

#!/usr/bin/python

 

print("Content-type: text/html\n\n")

print("This is a Python script text.")

 

Permissions are 0755, as recommended.

 

The server response was

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@benesolutions.heliohost.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

 

Could you clarify please what I’m doing wrong.

Posted

Thank you very much - now it works. Never could imagine that Python is so sensitive to EOLs. I've a project with tens of files, all prepared in Windows - it seems, I've to convert all of them. However, thanks again, the advice was really helpful.

Posted

I see Python 2.4, 2.7, and 3.4 on Johnny...

 

If you want 3.4, try using this for the shebang line:

#!/usr/local/bin/python3.4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...