It s a common misconception that relative paths are relative to the location of the python script but this is untrue. Unable to read mat file. On the other hand you should never use any directory in program files to store your data.