Open snowman907 opened 6 years ago
Hi, you should change like the following
import exiftool
fileno=r'DSC00001.JPG
with exiftool.ExifTool() as et:
et.execute("-GPSLongitude=100",fileno)
et.execute("-GPSLatitude=100",fileno)
This works well for me
My goal is to write data into the Exif-header of an image. Looking over a post from 2015 link on how to use Exiftool to write to the Exif header. I gave it a try:
In response, I got the following error:
TypeError: sequence item 0: expected a bytes-like object, str found
Then as specified in the documentation, execute takes byte commands, so I bites, so I tried that too:
But still got the same error :
TypeError: sequence item 1: expected a bytes-like object, str found
I am not sure what am I doing wrong, and if Exiftool can write to file. Thanks for the help. This question was also posted on StackOverflow here