Does anyone have any experience with reading PDF's via Python in Alteryx using the PyPDF2 package and can see what is wrong here?
I've managed to import the package but every time I try to run the workflow it fails with the following error message:
F
This is the script to open and read the file and this file definitely exists in this location. I've checked and double checked
import PyPDF2
pdf1File = open("P:\Content Manager\PDF\HABDHGOKMLD.PDF")
reader = (pdf1File)
number_of_pages = len(reader.pages)
page = reader.pages[0]
text = page.extract_text()
I have noticed '\' in the path is updated to '\\' in the error but even specifying this in the open statement returns the same error. This is probably something really obvious that I just can not see.
Thanks,