Code:
#!/usr/bin/python3
from PIL import Image, ExifTags
img = Image.open("/root/Bilder/sysPics/schwarz-weiß-Karte.jpg")
for i, j in img._getexif().items():
if i in ExifTags.TAGS:
print(ExifTags.TAGS[i] + " - " + str(j))
Error:
Traceback (most recent call last):
File "python-tool.py", line 7, in <module>
for i, j in img._getexif().items():
AttributeError: 'NoneType' object has no attribute 'items'
Can anyone help me? I never worked with the PIL lib but I saw a tutorial,
in which this .items() method worked:
https://www.youtube.com/watch?v=-PiR5SX4Mxo&list=PLNmsVeXQZj7onbtIXvxZTzeKGnzI6NFp_&index=8
There is no difference between his code and mine, I can't believe they cut off the .items() method in the last patches.