I'm new to python and I'm getting this error when trying to execute the following code which aims to take the contents of this pdf and put it in an excel document. My os is Windows 10 and I'm using VS code via Anaconda3. I'm not sure what I'm doing wrong. Thank you all in advance.
FileNotFoundError: [WinError 2] The system cannot find the file specified
import tabula
file_path = (r"C:\Users\shattv\anaconda3\envs\venv1\TestInvoice.pdf")
oup = (r"C:\Users\shattv\anaconda3\envs\venv1\test.xlsx")
df = tabula.read_pdf(file_path,pages="all")
df.to_excel (oup)
I tried checking os.getcwd and got the same file path:C:\Users\shattv\anaconda3\envs\venv1>. Below are screenshots of the excel and pdf files. I also tried changing to a backslash and still got this error.
C:/Users/shattv/anaconda3/envs/venv1/TestInvoice.pdf"