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: [Errno 2] No such file or directory: 'pdftoppm' #6

Closed
devudit opened this issue Feb 7, 2018 · 2 comments
Closed

Comments

@devudit
Copy link

devudit commented Feb 7, 2018

Hi I am getting this issue with the package

-- Python version 3.6.1

I am using it with flask micro framework

Here is the stack trace

  • Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
    [2018-02-07 11:18:47,787] ERROR in app: Exception on / [GET]
    Traceback (most recent call last):
    File "/Applications/MAMP/htdocs/Projects/py-pdftoimage/venv/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
    File "/Applications/MAMP/htdocs/Projects/py-pdftoimage/venv/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/Applications/MAMP/htdocs/Projects/py-pdftoimage/venv/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "/Applications/MAMP/htdocs/Projects/py-pdftoimage/venv/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
    File "/Applications/MAMP/htdocs/Projects/py-pdftoimage/venv/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
    File "/Applications/MAMP/htdocs/Projects/py-pdftoimage/venv/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functionsrule.endpoint
    File "/Applications/MAMP/htdocs/Projects/py-pdftoimage/py-pdftoimage.py", line 9, in main
    images = convert_from_path('/static/pdf/p1000.pdf', output_folder='/static/pdf/')
    File "/Applications/MAMP/htdocs/Projects/py-pdftoimage/venv/lib/python3.6/site-packages/pdf2image/pdf2image.py", line 23, in convert_from_path
    proc = Popen(args, stdout=PIPE, stderr=PIPE)
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 707, in init
    restore_signals, start_new_session)
    File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 1326, in _execute_child
    raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'pdftoppm'
    127.0.0.1 - - [07/Feb/2018 11:18:47] "GET / HTTP/1.1" 500 -
@Belval
Copy link
Owner

Belval commented Feb 7, 2018

What is your OS? This error arise when poppler is not installed on the host machine.

By the look of the paths in the stack trace, it seems to be MacOS so you would have to install poppler with brew.

@devudit
Copy link
Author

devudit commented Feb 7, 2018

Thanks for quick reply, Issue is resolved after installing poppler :)

@Belval Belval closed this as completed Feb 7, 2018
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