pyexiftool
pyexiftool copied to clipboard
OSError when passing config file to exiftool
When I try to init exiftool with custom config-file that describes some additional user tags I get this error:
File "/home/alex/.qgis2/python/plugins/geotagphotos/exiftool.py", line 193, in __enter__
self.start()
File "/home/alex/.qgis2/python/plugins/geotagphotos/exiftool.py", line 176, in start
stderr=devnull)
File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Here is my simplified code:
etPath = "exiftool"
cfgFile = "/path/to/config/file"
etPath += " -config " + unicode(cfgFile)
et = exiftool.ExifTool(etPath)
with et:
md = et.get_metadata("/path/to/photo")
print md
Sample files:
- photo http://hub.qgis.org/attachments/5368/AM00100M_F1_20110930_1556.jpg
- config file http://hub.qgis.org/attachments/5369/.ExifTool_config
Forgot to say, that this code worked previously, but now master crashes
Just tested pull-request #5. When passing additional options using new optional parameter addedargs all works fine. @smarnach any chance to merge it?