james-see / iptcinfo3

iptcinfo working for python 3 finally do pip3 install iptcinfo3
51 stars 31 forks source link

unable to init IPTCINFO #14

Closed thomasmenard closed 4 years ago

thomasmenard commented 4 years ago

Hello, i was testing iptcinfo3 but i can't simply read iptc from my jpeg file. See below error about it.

from iptcinfo3 import IPTCInfo
f=r"P:\Cartographie\CLIENTELE\PHOTOGRAPHIE\2012_AAM_04_250c\3001_300321.jpg"
info = IPTCInfo(f)

this is result of my code:

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>
  File "G:\Python27\ArcGIS10.2\lib\iptcinfo3.py", line 598, in __init__
    'contact': [],
  File "G:\Python27\ArcGIS10.2\lib\iptcinfo3.py", line 528, in __init__
    super().__init__(self, *args, **kwds)
TypeError: super() takes at least 1 argument (0 given)

thanks for responding my tiny problem

james-see commented 4 years ago

This package is for python 3. You are trying to use it with python 2.7. Please install regular iptcinfo to get the package that works for 2.7 or update your python version to 3. Closing.