Comments (9)
Hey @rannndom, apologies for the slow response - I've been away.
Could you check you're using the most recent version (0.8.0
)?
Additionally, is that the full traceaback? I don't see the actual error included there.
from py-pdf-parser.
@jstockwin
I am having the same issue
from py_pdf_parser.loaders import load_file
from py_pdf_parser.visualise import visualise
document = load_file("simple_memo.pdf")
visualise(document)
Running it results in the same traceback as rannndom. This is missing part in the tracback.
TypeError: use() got an unexpected keyword argument 'warn'
I can confirm that I am on version 0.8.0
.
pip freeze | findstr py-pdf-parser
py-pdf-parser==0.8.0
from py-pdf-parser.
Apologies, I thought a fix for this was included in 0.8.0
, but it was not.
I've just published a new release, 0.9.0
. Please could you try that out and let me know if it works?
from py-pdf-parser.
@jstockwin
I did a similar change on my local copy of 0.8.0
prior to you pushing out that update.
I am not sure if you made any other changes.
matplotlib.use("Qt5Agg") # noqa
I believe I ran into this same stack trace though.
After updating to 0.9.0
:
Traceback (most recent call last):
File "C:\Users\developer\Desktop\pec\parse.py", line 2, in <module>
from py_pdf_parser.visualise import visualise
File "C:\Users\developer\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\py_pdf_parser\visualise\__init__.py", line 1, in <module>
from .main import visualise
File "C:\Users\developer\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\py_pdf_parser\visualise\main.py", line 8, in <module>
from matplotlib import pyplot as plt
File "C:\Users\developer\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\matplotlib\pyplot.py", line 2500, in <module>
switch_backend(rcParams["backend"])
File "C:\Users\developer\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\matplotlib\pyplot.py", line 277, in switch_backend
class backend_mod(matplotlib.backend_bases._Backend):
File "C:\Users\developer\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\matplotlib\pyplot.py", line 278, in backend_mod
locals().update(vars(importlib.import_module(backend_name)))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\developer\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\matplotlib\backends\backend_qt5agg.py", line 11, in <module>
from .backend_qt5 import (
File "C:\Users\developer\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\matplotlib\backends\backend_qt5.py", line 13, in <module>
import matplotlib.backends.qt_editor.figureoptions as figureoptions
File "C:\Users\developer\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\matplotlib\backends\qt_editor\figureoptions.py", line 11, in <module>
from matplotlib.backends.qt_compat import QtGui
File "C:\Users\developer\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\matplotlib\backends\qt_compat.py", line 179, in <module>
raise ImportError("Failed to import any qt binding")
ImportError: Failed to import any qt binding
I don't have qt on this setup.
from py-pdf-parser.
@drakbar have you installed the dev version of the requirements (i.e. pip3 install py-pdf-parser[dev]
)? You need to do this to install pyqt5
, so that could be the issue.
See if you can run:
>>> import matplotlib
>>> matplotlib.use("qt5agg")
>>> from matplotlib import pyplot as plt
from py-pdf-parser.
Yeah I didn't have that package. An additional dependency of py-pdf-parser[dev]
, is MSVC++ Build Tools
.
I don't have time for all that right now, I will have to revisit this at a later date.
from py-pdf-parser.
Fair enough, sorry to hear that it's not going to work for you.
Unfortunately, the visualise tool will only work with those, and this is why I have it as a dev dependency.
To be clear, the rest of this package will work without it, i.e. you can do everything except call visualise
without those dependencies. However, visualise is one of the really helpful features when writing these things.
from py-pdf-parser.
I am fairly sure the issue itself (i.e. the TypeError: use() got an unexpected keyword argument 'warn'
) is fixed in 0.9.0
, so I am closing this issue. Feel free to re-open if I am wrong.
Happy to have a look at dependencies at some point, but that'll be a different issue.
from py-pdf-parser.
An additional dependency of py-pdf-parser[dev], is MSVC++ Build Tools.
FYI Version 0.10.0 switches out PyQt5 for Tkinter, which might reduce these additional requirements.
from py-pdf-parser.
Related Issues (20)
- Consider using sorted sets? HOT 1
- Ensure CI runs on PRs
- Use of Visualize HOT 2
- Unable to install with pip3 HOT 3
- extract_table ignores ordering defined while loading the document HOT 1
- [loaders] Loads accept LTTextLines as top level pdfminer elements, which breaks things
- Element extraction in original order HOT 2
- Release v0.8.0? HOT 3
- Add more tests for the visualise tool
- Document regular expression font mapping HOT 9
- ElementList filter on visualise function does not work HOT 1
- When will be there a new release to depend on wand 0.6.10? HOT 2
- How to open encrypted files by passing the password?
- How to run the lint process? HOT 1
- Unable to create an PDFDocument object HOT 2
- Switch to trusted publishing on PyPI
- Filter text ignoring case HOT 2
- Standardizing contains and equals HOT 1
- Does not install on Python 3.11+
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-pdf-parser.