this is the Directory its looking in:
'C:\Users\MyUsername\AppData\Local\Temp\SomeTempfile\TheDirectory\../sources/sources.csv'
it should be going:
C:\Users\MyUsername\Desktop\Pythonprogram\sources/sources.csv
Error Message:
Exception in Tkinter callback Traceback (most recent call last):
File "Directory\PythonFile.py", line 22, in pythonFunction FileNotFoundError: [Errno 2]
No such file or directory:
'C:\Users\Username\AppData\Local\Temp\SomeTempfile\MyFile\../sources/sources.csv'
the code im using is:
script_dir = os.path.dirname(__file__) # Script directory
full_path = os.path.join(script_dir, '../sources/sources.csv')
csv_file = open(full_path)
csv_table = list(csv.reader(csv_file, delimiter=';'))
I am using Pyinstaller to create the .exe file.