-
Notifications
You must be signed in to change notification settings - Fork 79
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
AttributeError: module 'base64' has no attribute 'decodestring' #169
Comments
Related: #158 |
Thank you! I installed python 3.8.12 with pyenv and now it works perfectly... and so fast! |
While using an older Python version might have been the solution, this does not seem to hold true any more, with recent Ubuntu versions shipping Python 3.10 by default and Python 3.11 being available. Adding a corresponding check should be easy enough while retaining compatibility with Python 2 (although this is broken for now: #158 (comment)). |
There is no need to support any Python version before 3.7 (which is the oldest version which is still officially supported). And you are right, the code should be fixed to work with recent Python versions, too. |
This apparently already has been fixed in 2019, but not yet released: d756f75 |
Hello!
I've install hocr-tools on both mac and ubuntu and get the same error. All images are jpg and the hocr files were created by tesseract.
I'm wondering if I have the wrong versions of supporting libraries installed.
Traceback (most recent call last):
File "/opt/homebrew/bin/hocr-pdf", line 143, in
export_pdf(args.imgdir, 300)
File "/opt/homebrew/bin/hocr-pdf", line 51, in export_pdf
load_invisible_font()
File "/opt/homebrew/bin/hocr-pdf", line 134, in load_invisible_font
uncompressed = bytearray(zlib.decompress(base64.decodestring(font)))
AttributeError: module 'base64' has no attribute 'decodestring'
Name: hocr-tools
Version: 1.1.1
Name: lxml
Version: 4.6.4
Name: Pillow
Version: 8.4.0
Name: reportlab
Version: 3.6.2
The text was updated successfully, but these errors were encountered: