我正在嘗試打印圖像的EXIF。 這是我的代碼:正在讀取EXIF給出錯誤
with Image(filename="/home/hapoofesgeli/Desktop/b.jpg") as image:
for k, v in image.metadata.items():
if k.startswith('exif:'):
print(k, v)
但它給出了一個錯誤:
Traceback (most recent call last):
File "/home/hapoofesgeli/Programming/Test/Test.py", line 5, in <module>
for k, v in image.metadata.items():
File "/usr/lib/python3.3/collections/abc.py", line 480, in __iter__
yield (key, self._mapping[key])
File "/usr/lib/python3.3/site-packages/wand/image.py", line 2260, in __getitem__
raise TypeError('k must be a string, not ' + repr(format))
TypeError: k must be a string, not <built-in function format>
如何解決這個問題?
這似乎是一個錯誤,並固定在主:https://開頭github.com/dahlia/wand/commit/11235ee204a48e060498e63a9171c55c1ba808d4 – minhee
所以這是一個錯誤...謝謝。 – user2524343
對不起,我應該如何使用固定版本?我用新的替換了舊的image.py和tests/image_test.py,並使用python setup.py install進行安裝。但現在我得到這個錯誤:ImportError:無法導入名稱encode_filename – user2524343