Lightroom Classic: Catalog import fails to merge folder paths

  • 1
  • Problem
  • Updated 4 months ago
  • (Edited)
I have been coalescing my mini travel catalogs in to my main catalog. They import fine, but they show up in the folder panel not in the correct spot in the directory tree. When I do show parent folder it gives me 

An internal error has occurred: Database "E:\lightroom\lightroom.lrcat": UNIQUE constraint failed: AgLibraryFolder.rootFolder, AgLibraryFolder.pathFromRoot Statement: UPDATE AgLibraryFolder SET rootFolder = ?,pathFromRoot = ? WHERE

and an ok button. I tried doing update folder location 


My folder tree looks like this:

2018
    trip 1
2019 
    trip 2
Z
  2018
        january
  2019
         january
        february

where the actual hard drive is:

Z
 2018 
    trip 1
    january
 2019 
    trip 2 
    january
    february


In future I'll make sure to do show parent folder in the mini trip catalog before I import it, but how do I fix my main catalog now?
Photo of Bryn Forbes

Bryn Forbes

  • 2 Posts
  • 0 Reply Likes

Posted 4 months ago

  • 1
Photo of Bill

Bill

  • 290 Posts
  • 51 Reply Likes
I use a very different approach which eliminates the need to merge catalogs:
  • use "sidecar" files. Then all the info about the photo is stored in this separate file. 
  • copy the images with their sidecars into the appropriate master folders
  • Import from the folders, now all the edits, keywords etc are correctly associated with the images
BTW, if you keep sidecar files for all your images and your catalog is irrecoverably corrupted, you can just create a fresh catalog and import your whole library. 

I personally find this approach to be more straightforward and less error prone. 

Photo of Robert Somrak

Robert Somrak, Champion

  • 735 Posts
  • 230 Reply Likes
Unfortunately "sidecar" files don't bring in virtual copies.
Photo of Bill

Bill

  • 290 Posts
  • 51 Reply Likes
Unless there is a need to keep a virtual copy, virtual. I export them as the original file type into the same folder. Perhaps not ideal but works for me as I make very limited use of this feature. 

Photo of Robert Somrak

Robert Somrak, Champion

  • 735 Posts
  • 230 Reply Likes
I do the same thing.  I have an export preset just for this purpose. If I have multiple vc's it just adds number to the filename.

Photo of Bryn Forbes

Bryn Forbes

  • 2 Posts
  • 0 Reply Likes
Strangely I left my computer exporting one of the problem trees as a catalog (was planning to remove, open exported catalog do show parent filter all the way up to the root then reimport) but I came back to computer after it finished to find the library folder tree to now look like this

z
  2018
  2019
Z
 2018
 2019

so importing the catalog perhaps has a bug in it with capital letters in path names?

Photo of Robert Somrak

Robert Somrak, Champion

  • 735 Posts
  • 230 Reply Likes
Looks like the lowercase/uppercase issue addressed here.

https://www.lightroomqueen.com/capitalization-catalog-error/
Photo of Sunil Bhaskaran

Sunil Bhaskaran, Official Rep

  • 488 Posts
  • 179 Reply Likes
Do you still get the internal error that you mentioned in the first post when show/hide parent folders?
I will send an e-mail off list; we can investigate the error in the catalog.

Thanks,
Sunil
Photo of Johan Elzenga

Johan Elzenga, Champion

  • 2971 Posts
  • 1270 Reply Likes
What you can do in the meantime is use 'Import from Another Catalog', but keep the originals where they are. That means you have merged the catalogs, but the new photos are still in their original place. You can now move these by using drag & drop in the folder panel.