Lightroom Classic: Missing folder removal causes internal database error message

  • 1
  • Question
  • Updated 8 months ago
  • (Edited)
I have some missing folders in Lightroom classic - the folders were moved using Windows file explorer. When I try to tell the catalog to remove the missing folders I get a message that says there is a internal database error. How can I fix this to remove the missing folders?
Photo of Jeff Jones

Jeff Jones

  • 4 Posts
  • 0 Reply Likes

Posted 8 months ago

  • 1
Photo of Rick Spaulding

Rick Spaulding, Champion

  • 564 Posts
  • 221 Reply Likes
It may help to first find the missing folders in Lightroom then remove them if you like. When you move files or folders outside of Lightroom weird things can happen. 

If you're not familiar with doing that, check out this post:

https://www.lightroomqueen.com/lightroom-photos-missing-fix/

You could also try simply putting the folders back where they were and see if Lightroom recognizes them again.

Cheers!

Rick
Photo of Dwight DeLong

Dwight DeLong

  • 14 Posts
  • 1 Reply Like
Did you try synchronizing the catalog from the parent folder?
Photo of Jeff Jones

Jeff Jones

  • 4 Posts
  • 0 Reply Likes
When I right click on the missing folders it only gives me three options -- find missing folder, remove, and show parent folder.

I synchronized the new folder that the missing folders were placed inside, but that did not help, and the locate missing folder command does not work when I point it to the new location.
Photo of Jeff Jones

Jeff Jones

  • 4 Posts
  • 0 Reply Likes
When I click show parent folder the full message is: 
An internal error has occurred "D:\OneDrive.....\lightroom.lrcat"; UNIQUE constraint failed: AgLibraryFolder.rootFolder, AgLibraryFolder.pathFromRoot 
Statement: UPDATE  AgLibraryFolder SET rootFolder = ?,pathFromRoo = ? WHERE
Photo of Dwight DeLong

Dwight DeLong

  • 14 Posts
  • 1 Reply Like
hmm. You are using your local OneDrive folder? That adds a degree of complexity. OneDrive synching might be the issue. You might try copying the lrcat file from the OneDrive folder, double-clicking on the lrcat from the new location, and seeing how that works.

I also routinely validate and optimize the catalog upon exiting. Sometimes just optimizing isn't enough.
Photo of Jeff Jones

Jeff Jones

  • 4 Posts
  • 0 Reply Likes
I have been using the onedrive folder for my Lightroom catalog for several years as I move between my desktop, laptop and y classroom computer and not had this issue come up before.  

I have decided that my workaround is to select the other folders on the drive (my D drive is internal on my laptop)  and export them as a new catalog so I don't lose my edits and keywords, then I'll simply trash this catalog and make the new exported one my main catalog.