Problem with paths in my script, relative to local python file
The current file's location is obtained using __file__

import os
current_file_path = __file__
current_file_dir = os.path.dirname(__file__)


to access a file in the same directory as this python file you do

other_file_path = os.path.join(current_file_dir, "other_file.ext")
with open(other_file_path) as f:
   ...


if there's a directory on the same path as the main python file you can get that by doing

other_file_path = os.path.join(current_file_dir, "directory", "other_file.ext")
with open(other_file_path) as f:
   ...