camelot-dev / camelot

A Python library to extract tabular data from PDFs
https://camelot-py.readthedocs.io
MIT License
2.96k stars 466 forks source link

Issue in handlers.py #365

Open code4efa4code opened 1 year ago

code4efa4code commented 1 year ago

tables=camelot.read_pdf('C:/Users/e/Manual.pdf',pages=164) Traceback (most recent call last): File "", line 1, in File "C:\Users\e.venv\lib\site-packages\camelot\io.py", line 111, in read_pdf p = PDFHandler(filepath, pages=pages, password=password) File "C:\Users\e.venv\lib\site-packages\camelot\handlers.py", line 50, in init self.pages = self._get_pages(pages) File "C:\Users\e.venv\lib\site-packages\camelot\handlers.py", line 83, in _get_pages for r in pages.split(","): AttributeError: 'int' object has no attribute 'split'

This resolved it for me for r in str(pages).split(","):

lipsa7 commented 1 year ago

Hi @code4efa4code, can you please help me with an error?

I ran the code tables.export('foo.xlsx', f='excel'), but it is throwing me an error: TypeError: NDFrame.to_excel() got an unexpected keyword argument 'encoding'

Can you please help with this?