Can’t run a Python script on server but working on local machine

There are several possible errors that can result in this. You can go to your server’s console and run the script from common line to check for error.

The most common are:

  1. Python modules/package not installed on server.
  2. Your script is saved as CRLF while your server requires your source code to be saved as LF.
  3. Python version on server is different from your local machine so some code may report error
  4. Didn’t give the right file permission as most of the time the file permission needed is “755” and above.

Leave a Comment

Your email address will not be published. Required fields are marked *

− 1 = 5