Author Topic: Inexplicable error when writing custom tag  (Read 1062 times)

remarkableearth

  • Full Member
  • ***
  • Posts: 36
Inexplicable error when writing custom tag
« on: December 13, 2017, 03:31:27 PM »
I've customized a bunch of tags and successfully written them to thousands of files of various types as indicated in my recent questions to this forum on other issues. This time, using a variation of exiftool -testtag=testvalue a.jpg to write a single value or exiftool -r -testtag=testvalue . to write the value to all files within a directory tree, I get an error. When I run the command above over a.JPG with progressive forms of -v I get this:
Code: [Select]
Rewriting a.jpg...
  Error = Error creating file: a.jpg_exiftool_tmp
Error: Error creating file: a.jpg_exiftool_tmp - a.jpg
    0 image files updated
    1 files weren't updated due to errors

I can't decipher this.

Anyone have a way to determine what the error really is? Because only by knowing what it is will I be able to figure out how to fix it.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3955
Re: Inexplicable error when writing custom tag
« Reply #1 on: December 13, 2017, 03:40:58 PM »
Did you check to see if the file "a.jpg_exiftool_tmp" exists?  That's the temp file created when exiftool is writing a new file.  If it is interrupted for some reason while writing, the temp file might be left behind.

If it does exists, just delete it and retry your command.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

remarkableearth

  • Full Member
  • ***
  • Posts: 36
Re: Inexplicable error when writing custom tag
« Reply #2 on: December 13, 2017, 04:02:17 PM »
I looked for a.jpg_exiftool_tmp file in the directory but do not see it. If the process of writing it was interrupted and left behind as you say, was it even created? Is there a way of creating or restoring it?

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 3955
Re: Inexplicable error when writing custom tag
« Reply #3 on: December 13, 2017, 04:23:35 PM »
If you don't see it, then that's not the problem.  And now that I think about it the error message for that is something like temp file  already exists.

Only other things I can think of is if you have write permission for that directory, disk full, or some other disk problem.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

remarkableearth

  • Full Member
  • ***
  • Posts: 36
Re: Inexplicable error when writing custom tag
« Reply #4 on: December 13, 2017, 04:44:48 PM »
Thanks, StarGeek. I attempted the same command over files I had previously successfully run it and got this error:
Code: [Select]
Error: Error creating file: ./file.JPG_exiftool_tmp - ./file.JPGBasically the same as above. So I think you may be on to something but I just don't know what. It's puzzling.

remarkableearth

  • Full Member
  • ***
  • Posts: 36
Re: Inexplicable error when writing custom tag
« Reply #5 on: December 13, 2017, 06:28:00 PM »
StarGeek,

Your suggestion that the disk could be full was right on. I made some room and can now write tags.

Thank you.

Now I have a problem writing more than one custom tag at a time which I've described in another question on this forum. Any ideas?