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

Could not find import_from_pdf function #292

Closed
marcellalves opened this issue Sep 15, 2018 · 4 comments
Closed

Could not find import_from_pdf function #292

marcellalves opened this issue Sep 15, 2018 · 4 comments

Comments

@marcellalves
Copy link

I need to import data from pdf and found this example: https://gist.github.com/turicas/6b9ca83dcd531a6cd4fd87ced2a28c70

But I was unable to run it, since the import_from_pdf is not available to me.

I have already run the command: pip install rows[all]

Is pdf format no longer supported?

@turicas
Copy link
Owner

turicas commented Sep 17, 2018

The PDF support is not merged into develop branch, so you need to install it from the feature/plugin-pdf git branch by running:

pip install -U git+https://github.com/turicas/rows.git@feature/plugin-pdf#egg=rows

You also need to install the PDF requirements:

pip install pdfminer.six cache-property

@turicas turicas closed this as completed Sep 17, 2018
@mmdfmateus
Copy link

i just installed the pdf branch and still get the message ' module 'rows' has no attribute 'import_from_pdf''

here a snap from my pip freeze
image

what am i missing? do i have to import it using a different name?

@turicas
Copy link
Owner

turicas commented Sep 24, 2018

You also need to install two libraries: pdfminer.six and cached-property. Did you install them? The function import_from_pdf will be available if no ImportError is raised when importing rows/plugins/plugin_pdf.py.

@mmdfmateus
Copy link

@turicas thanks for answering that fast! hahahah just installed these libraries and did work perfectly with the example above in this post. But when i tried with this url i get the following error:

image

I also tried starts_after and ends_before trying to match the exact table in the pdf. But maybe is just me being newbie with the lib! :P amazing work btw ahahahah

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

3 participants