Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants