to_image causes 'map' object is not subscriptable in Image.py, line 1203 #637
-
Hi, I have this code working on one computer, but not the other:
traceback:
Working computer (Ubuntu 18.04.6 LTS) has python 3.7.6, ImageMagick 7.1.0-19 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @tye-shutty, and thanks for posting. Looking at the traceback, and investigating further, this seems to have something to do with newer versions of If you'd like to check for your particular case, can you add this line to your script and rerun on your two machines: import PIL
print(PIL.__version__) If that's indeed the case for you, the immediate fix would be to run |
Beta Was this translation helpful? Give feedback.
Hi @tye-shutty, and thanks for posting. Looking at the traceback, and investigating further, this seems to have something to do with newer versions of
PIL/pillow
. As defined in itsrequirements.txt
,pdfplumber
requiresPillow>=8.4
. The code works fine for me with8.4
(and9.0
) but falis (with the same error) when I upgrade to the latest version,9.1
, released just 10 days ago. (Specifically, it appears to stem from the addition of these lines checking for negative crops.)If you'd like to check for your particular case, can you add this line to your script and rerun on your two machines:
If that's indeed the case for you, the immediate fix would be to run
p…