Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError #484

Open
Tonumoy opened this issue May 20, 2022 · 1 comment
Open

FileNotFoundError #484

Tonumoy opened this issue May 20, 2022 · 1 comment

Comments

@Tonumoy
Copy link

Tonumoy commented May 20, 2022

My Code:

import camelot
file = "C:/Users/tonum/OneDrive/Desktop/Codes/SBI statement.pdf" 
tables = camelot.read_pdf(file)

The Error:

Traceback (most recent call last):

  Input In [22] in <cell line: 4>
    tables = camelot.read_pdf(file)

  File ~\anaconda3\envs\camelot\lib\site-packages\camelot\io.py:113 in read_pdf
    tables = p.parse(

  File ~\anaconda3\envs\camelot\lib\site-packages\camelot\handlers.py:172 in parse
    self._save_page(self.filepath, p, tempdir)

  File ~\anaconda3\envs\camelot\lib\site-packages\camelot\handlers.py:110 in _save_page
    with open(filepath, "rb") as fileobj:

FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/tonum/OneDrive/Desktop/Codes/SBI statement.pdf'

Maybe a naïve one, but couldn't figure out...

@SWHL
Copy link

SWHL commented Jun 15, 2022

This may be caused by spaces in the file path.
Try:

import camelot
file = "C:/Users/tonum/OneDrive/Desktop/Codes/SBIstatement.pdf" 
tables = camelot.read_pdf(file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants