I am trying to open a .mht file in my local system. But it is throwing me File Not Found Error even if the file exists. THis MHTML file is the output of the step recorder in Windows. I want to extract only the text in the file.
The function I used to open the file is:
with open(mi_file) as fp
where mi_file
is holding the file name.
The error I am getting is:
Traceback (most recent call last):
File "C:/Users/swapn/PycharmProjects/StepRecorderAutomation/mhtml_parsing.py", line 40, in <module>
with open(mi_file) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'Recording_20200528_1557.mht'
Could someone please help me to find what am I doing wrong here?