EXIFtool problem with writing back metadata

Started by bnewman, June 29, 2018, 11:26:23 PM

Previous topic - Next topic

bnewman

I'm sure I've done this before but don't know what to do to correct the issue.

Here is the scenario:

I change the rating for a single NEF file to one star.
IMatch displays the rating and the "pencil" icon to remind of the need to writeback the metadata.
I click the pencil, and get an error message. The output panel for ExifTool contains the following:

Quote-overwrite_original_in_place
-charset
FILENAME=UTF8
-m
-use
MWG
-charset
ExifTool={PTETCHARSET}
-ex
-sep

-XMP-xmp:Rating=1
-XMP:CreatorTool=photools.com IMatch 17.11.0.4 (Windows)

-xmp:DocumentID=xmp.did:c2ab81a7-44ed-4221-a98a-9584c996c001

-xmp:OriginalDocumentID=xmp.did:c2ab81a7-44ed-4221-a98a-9584c996c001

-xmp:InstanceID=xmp.iid:234162ed-f247-496c-aa8e-5bcd2bd6ccc0

-XMP:MetadataDate=now
-XMP:ModifyDate=now
E:Photos\2018\06 - June\P20180601-043.xmp
-execute
-execute9999

    0 image files updated
    1 files weren't updated due to errors


----- Runtime: 0.2 s.
Error: Error creating file: E:Photos/2018/06 - June/P20180601-043.xmp - E:Photos/2018/06 - June/P20180601-043.xmp

The rating is still shown as well as the pencil icon and a warning icon that the writeback has failed. When I click the pencil icon a second time, the rating is cleared in IMatch and the output panel includes:

Quote----- Runtime: 0.0 s.
Error: Error creating file: E:Photos/2018/06 - June/P20180601-043.xmp - E:Photos/2018/06 - June/P20180601-043.xmp

I note that in the Windows file folder, the NEF file has no XMP sidecar file. Based on other posts, I run the ExifTool Command Processor using the "Delete XMP Metadata" preset. Output of the Command Processor says "1 image file updated". Checking the Windows file folder, there is no new XMP file, but the file has shown to be modified minutes ago.

I repeat the operation: change the rating, click the writeback metadata icon, get the failure message with a similar error report in Exiftool output. At this point the IMatch log contains:

Quote06.29 15:39:12+42813 [050C] 01  W> ETWARN:Error: Error creating file: E:Photos/2018/06 - June/P20180601-043.xmp - E:Photos/2018/06 - June/P20180601-043.xmp
  'PTETWrapper.cpp(3341)'
06.29 15:42:20+188750 [050C] 01  W> ETWARN:Error: Error creating file: E:Photos/2018/06 - June/P20180601-043.xmp - E:Photos/2018/06 - June/P20180601-043.xmp
  'PTETWrapper.cpp(3341)'
06.29 15:54:33+732437 [29E0] 00  M>  >  1 CIMRelationManager::UpdateVerbCache  'IMRelationManager.cpp(551)'
06.29 15:54:33+    0 [29E0] 00  M>  <  1 CIMRelationManager::UpdateVerbCache
06.29 15:57:09+155953 [050C] 01  W> ETWARN:Error: Error creating file: E:Photos/2018/06 - June/P20180601-043.xmp - E:Photos/2018/06 - June/P20180601-043.xmp
  'PTETWrapper.cpp(3341)'

Note that there are no "tmp" or "xmptmp" files in the folder. Only NEF's and XMP files. There are no access limitations as far as I can tell.

Also, I've tried the same operation on files in other folders, and with the same failed result.


Please advise what is the corrective action.




Mario

E:Photos\2018\06 - June\P20180601-043.xmp seems to be missing a \ after the E: ...
I don't know if this is just an issue with what ExifTool reports or if IMatch for some obscure reason is sending it an invalid path.
IMatch produces the path of the XMP file by swapping the RAW extension with XMP. I have never noticed a problem with that.

Please attach the IMatch log file of that session in ZIPped form.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bnewman

I don't want to mix many things at the same time, but weirdness is happening.

I recalled the past time where I couldn't get the EXIFtools to write. You helped me out with that last November. At the time, the issue was that the Antivirus software was blocking both the drive where I had moved my files, and was also blocking the exiftools.exe. That is not the case this time. I also checked to ensure that the "E" drive has access writes that shouldn't block IMatch at all (attached "Access Rights.jpg" and "Access Rights Everyone.jpg").

I reverted to the previously backed up database from several hours before I reported this issue. I ran a diagnostic on that backed database, and it issued one warning about a pending writeback that was not there and which it removed. On this pass, the "Metabase" step had a warning icon. I ran a second diagnostic and everything was ok.

Now, I again applied a rating and label to four files. I tried to write the metadata back, and got this in the output panel:

Quote-overwrite_original_in_place
-charset
FILENAME=UTF8
-m
-use
MWG
-charset
ExifTool={PTETCHARSET}
-ex
-sep

-XMP-xmp:Label=Approved
-XMP-xmp:Rating=5
-XMP:CreatorTool=photools.com IMatch 17.11.0.4 (Windows)

-xmp:DocumentID=xmp.did:44f62f00-3ca3-41d9-9fae-0ee73fac1b06

-xmp:OriginalDocumentID=xmp.did:44f62f00-3ca3-41d9-9fae-0ee73fac1b06

-xmp:InstanceID=xmp.iid:cb05c87f-7cb3-426e-9de2-5296381f11e7

-XMP:MetadataDate=now
-XMP:ModifyDate=now
E:Photos\2018\03 - March\P20180306-009.xmp
-execute
-execute9999

    0 image files updated
    1 files weren't updated due to errors


----- Runtime: 1 s.
Error: Error creating file: E:Photos/2018/03 - March/P20180306-009.xmp - E:Photos/2018/03 - March/P20180306-009.xmp
-overwrite_original_in_place
-charset
FILENAME=UTF8
-m
-use
MWG
-charset
ExifTool={PTETCHARSET}
-ex
-sep

-XMP-xmp:Label=
-XMP-xmp:Rating=0
-XMP:CreatorTool=photools.com IMatch 17.11.0.4 (Windows)

-xmp:DocumentID=xmp.did:9985cc25-450a-487c-88eb-fa8a305ec5b0

-xmp:OriginalDocumentID=xmp.did:9985cc25-450a-487c-88eb-fa8a305ec5b0

-xmp:InstanceID=xmp.iid:8db80793-6b83-45b5-947b-bd3450f7af71

-XMP:MetadataDate=now
-XMP:ModifyDate=now
E:Photos\2018\03 - March\P20180306-010.xmp
-execute
-execute9999

    0 image files updated
    1 files weren't updated due to errors


----- Runtime: 0.2 s.
Error: Error creating file: E:Photos/2018/03 - March/P20180306-010.xmp - E:Photos/2018/03 - March/P20180306-010.xmp
-overwrite_original_in_place
-charset
FILENAME=UTF8
-m
-use
MWG
-charset
ExifTool={PTETCHARSET}
-ex
-sep

-XMP-xmp:Label=
-XMP:CreatorTool=photools.com IMatch 17.11.0.4 (Windows)

-xmp:DocumentID=xmp.did:8fd81063-ba9f-421c-964e-ead3eaed839e

-xmp:OriginalDocumentID=xmp.did:8fd81063-ba9f-421c-964e-ead3eaed839e

-xmp:InstanceID=xmp.iid:da3ed736-81c7-47d6-a4b0-395ff9af2825

-XMP:MetadataDate=now
-XMP:ModifyDate=now
E:Photos\2018\03 - March\P20180306-011.xmp
-execute
-execute9999

    0 image files updated
    1 files weren't updated due to errors


----- Runtime: 0.2 s.
Error: Error creating file: E:Photos/2018/03 - March/P20180306-011.xmp - E:Photos/2018/03 - March/P20180306-011.xmp
-overwrite_original_in_place
-charset
FILENAME=UTF8
-m
-use
MWG
-charset
ExifTool={PTETCHARSET}
-ex
-sep

-XMP-xmp:Label=Approved
-XMP-xmp:Rating=5
-XMP:CreatorTool=photools.com IMatch 17.11.0.4 (Windows)

-xmp:DocumentID=xmp.did:17348b62-2b88-4c3e-838f-454834453d56

-xmp:OriginalDocumentID=xmp.did:17348b62-2b88-4c3e-838f-454834453d56

-xmp:InstanceID=xmp.iid:fd28b2f7-a5bd-4975-baa0-d5c3efe42ad2

-XMP:MetadataDate=now
-XMP:ModifyDate=now
E:Photos\2018\05 - May\P20180504-038.xmp
-execute
-execute9999

    0 image files updated
    1 files weren't updated due to errors


----- Runtime: 0.1 s.
Error: Error creating file: E:Photos/2018/05 - May/P20180504-038.xmp - E:Photos/2018/05 - May/P20180504-038.xmp

I had not noticed the "E:Photos" before, and don't know if this is unexpected.

I changed the logging to "Full Debug" at this point, and then I went to one of the files that failed to writeback, and selected just the one file for writeback. Before I did the writeback, the file had the rating and label but with the "writeback error" icon displayed. After the writeback, the label and rating were removed. The Output panel displayed:

Quote----- Runtime: 0.0 s.
Error: Error creating file: E:Photos/2018/03 - March/P20180306-009.xmp - E:Photos/2018/03 - March/P20180306-009.xmp

The log after these two operations is attached ("IMATCH6_LOG.TXT"). It shows both the failure of the four files, and then the fail of the one fail with full debugging turned on.

I also ran a diagnostic on the database at this point, and again got the warning error that was repaired (attached "im5diag.txt").

Finally, I reapplied the rating and label to the one file that was removed in the previous operation (filename P20180606-009). The operation again failed with a similar report in the output panel. For what's worth, I'm attaching the dialog box that appears when this error occurred (IMatch error dialog box.jpg).

I said that I didn't want to mix things because of weirdness, but when I was doing this operation last night, suddenly IMatch showed that it had disconnected with the entire E: drive and there were missing files icons on all the files in all the folders. A really scary sight to see. I exited and returned and everything was found again. I only mention this additional anomaly in the interests of providing a full as possible of a description.

I really hope that you can help me.

Thanks.



bnewman

PROBLEM SOLVED. No need for assistance.

Your remark
QuoteE:Photos\2018\06 - June\P20180601-043.xmp seems to be missing a \ after the E: ...
I don't know if this is just an issue with what ExifTool reports or if IMatch for some obscure reason is sending it an invalid path.

kept nagging me. This point came full force when I transferred a file to Lightroom. Then it also put it in a folder E:Photos\<folder name> rather than E:\...

So, I really did think that it was somehow something in IMatch. Then I remembered that about two months ago, I installed a new hard drive and copied all the files there keeping the folders intact. All the files were in subfolders of a parent root folder "Photos". In IMatch, I relocated all the files. In doing the relocation, somehow - and I don't know how - the folders got relocated to "E:Photo" rather than "E:\Photo". I'm sure that I specified that, but I absolutely don't know how. The weird thing is that IMatch was good with all of this. It was writing the XMP's in the correct folder, and generally behaving nicely. Even the diagnostic log that I attached in the previous post shows that IMatch thoght the files were located at E:\Photos and not E:Photos. But when I wanted to writeback metadata, is when the issue showed itself!

So, I just relocated the files again and instead of specifying the drive "E:" as IMatch offered, i changed the new destination to be "E:\" adding the backslash myself. IMatch went to work and did the relocation. After that, I was able to do metadata writebacks without problem.

I'm not sure whether this is some kind of bug in IMatch or just user error in the way that the destination drive is selected. But if it is user error, IMatch hid my error that from me.

I think that this relocation operation also resolves the problem that I reported at the end of the post where IMatch seemed to disconnect from the folders until I restarted it.

Mario

Did you used a folder relocate (for the top-level folder "photos") or did you relocate the entire drive (from the drive node in the Media&Folders view)?

IMatch checks if the target exists and contains the same files you are going to relocate so it should always use a "real" and working path / drive.
Knowing exactly how you relocated to E: is important for me to reproduce your steps to see if there is a yet unknown problem.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bnewman

I wish I could remember with 100% certainty - it was a few months ago. However, I am fairly certain that I used relocate with the drive letter. The prompt showed "E:". The entire folder structure in the drive started at the folder "Photo". Maybe it's worth trying in both cases to see if there is any difference. What was weird was that IMath itself seemed ok to find the files without the "\" following the drive letter. Only EXIFTools was having trouble as well as when it copied to Lightroom.

Mario

I've made some tests. It is irrelevant whether you relocate to drive E: or E:\.
IMatch internally always produces the proper path for relocation.
I assume that you used Drive Relocate. For Folder Relocate, IMatch actually checks if the specified path exists, so E: would not make it.

We would need the precise steps you used to reproduce this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

bnewman

Sorry that I can no longer recall exactly what I had done.

The operation that was failing before when doing the metadata writeback now works fine, finding the file as shown for example by this output:
Quote-overwrite_original_in_place
-charset
FILENAME=UTF8
-m
-use
MWG
-charset
ExifTool={PTETCHARSET}
-ex
-sep

-XMP-xmp:Label=Approved
-XMP:CreatorTool=photools.com IMatch 17.11.0.4 (Windows)

-xmp:InstanceID=xmp.iid:8566be9f-4450-49fe-b792-8f878dc2dac8

-XMP:MetadataDate=now
-XMP:ModifyDate=now
E:\Photos\2018\03 - March\P20180318-001.xmp
-execute
-execute9999

    1 image files updated


----- Runtime: 0.1 s.

what I did before was as follows, to the best of my recollection. On opening IMatch2017, the Media&Folders window showed, under "Database" a folder "D:" containing all the subfolders, and they all had a warning icon about the file/folder being missing. I positioned the cursor on the "D:" in the window, and did a right-click to select the "Relocate". I guess that is the "drive relocate". The dialog box for the relocate identified all the folders that need relocation showing them as "D:\Photos\..." and suggested "E:" as the drive to relocate to. I don't know how I could have managed to select something that would result in IMatch relocating to "E:" instead of "E:\". I wish I did know, so I'd never do that again.

Thank you for being so responsive in any case.

Mario

This is the drive relocate dialog.
I've tested that and whether you relocate to D: or D:\, it always works correct.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook