I’m facing an error in reading the data from the file as specified by --directory flag. It seems I’m trying to read from file that doesn’t exist or I’m reading it incorrectly…? ss attached for the same.
Code in python that I’m using to read file from absolute path:
fn = sys.argv[2]
if os.path.exists(fn):
with open(os.path.basename(fn)) as f:
file_data = f.read()