File not found error occurs when reading a file as relative path in Visual Studio Code. The file is currently in the same folder as the python script. The same script is read successfully by running it in the Visual Studio.
How can i fix it so It can be read a file as relative path in Visual Studio Code?
Here my python script:
import numpy as np
file_name = 'file.csv'
xy = np.loadtxt(file_name, delimiter=',') # File not found error occured in Visual Studio Code
My OS is Windows.