• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.
  • Dark mode now has a single preference for the whole site! It's a simple toggle switch in the bottom right-hand corner of any page. As it uses a cookie to store your preference, you may need to dismiss the cookie banner before you can see it. Any problems, please let us know!

Library module keywords

Status
Not open for further replies.

orrpix

Member
Premium Classic Member
Joined
Apr 4, 2019
Messages
43
Location
Wiltshire, UK
Lightroom Experience
Power User
Lightroom Version
Lightroom Version Number
Lightroom Classic version: 10.4
Operating System
  1. macOS 11 Big Sur
After I merged two large catalogs to make a single one with over 520,000 previews in it, I have been seeing strange Keywording features.
1. Several thousand now show Madagascar in the 'Keywords and Containing Keywords' panel and also in the Will Export panel- only a few hundred should be showing this.
2. When I try to enter the keyword 'Madagascar' in the Enter Keywords panel, I get an internal error message popup saying:
?:0: attempt to index field 'parent' (a nil value)
3. I cannot delete Madagascar as the keyword doesn't appear in the Enter Keywords panel.
4. I have lost the predictive text function when entering keywords
5. The keyword Madagascar only appears once in the keyword list, and in the correct place in the tree, under Africa.
6. There is no mark (-) against madagascar in those previews that are not taken in madagascar, yet they show madagascar in the containing keywords view.

Any suggestions as to how to fix this?
 
Search for “Madagascar” in the search file of the Keywords list panel. This should show you the “Madagascar” keyword and if it exists in more than one place in a hierarchical Keyword list. Each “Madagascar” keyword will have a number to the right indicating how many images are assigned to that particular keyword. Clicking on the number beside the keyword will open a grid view of the images assigned to that keyword.

You can right click on any keyword in the Keyword list to edit and determine if the “will export” flag is set.


Sent from my iPad using Tapatalk
 
Thanks for your quick response.
Yes, I have searched for Madagascar and I can see that it occurs exactly where I would expect it to - in my hierarchy it appears under Location>Africa>Madagascar and the number against it is 3,817 which is the number of previews I have keyworded with Madagascar.
So far so good, BUT, if I enter the search term Madagascar in the grid view Library Filter, by asking for Any Searchable Field, Contains All, Madagascar, it returns 346,141 of 519,113 previews! This is erroneous, as I have never assigned that keyword to any previews that weren't taken in that location. However, if I look at Keyword and Containing keyword for any of these sorted previews there is the keyword Madagascar listed!
I cannot remove it as it disappears when I change from containing keywords to Edit Keywords.
This error seemed to arrive after I performed a major merge of two catalogs.
By the way, I have restored auto-fill on keywording by deleting the Helper file.
Any thoughts on how to get rid of the incorrect allocation of Madagascar?
It seems to me significant that I'm getting the error message:
?:0: attempt to index field 'parent' (a nil value)
if I actually type in Madagascar in Edit Keywords mode for previews that are appearing in this sort.
Beginning to wish I'd never visited the place!
Peter
 
4. I have lost the predictive text function when entering keywords
Exit LR. Open Finder on your catalog folder by doing Catalog Settings > General > Show. Delete the file "<catalog name> Helper.lrdata", being extremely careful not to delete anything else. Restart LR, and it will reconstruct the Helper.lrdata file.

The Helper.lrdata file contains, among other things, information about keywords previously entered, which LR uses for auto-completion of keywords. There have been other reports of Helper.lrdata getting "confused" after merging and major upgrades.
 
…if I enter the search term Madagascar in the grid view Library Filter, by asking for Any Searchable Field, Contains All, Madagascar, it returns 346,141 of 519,113 previews! …
Peter

I think the problem here is “Any Searchable Field” The Word could be in a Title or Caption or location. Change the criteria from “Any Searchable Field” to “Keywords” and you should get the same response as searching through the Keywords List panel


Sent from my iPad using Tapatalk
 
I think the problem here is “Any Searchable Field” The Word could be in a Title or Caption or location. Change the criteria from “Any Searchable Field” to “Keywords” and you should get the same response as searching through the Keywords List panel


Sent from my iPad using Tapatalk
Thanks Cletus.
Yes, I did try that before while trying to figure out what was happening, and strangely it still reports 346141 instances.
You can see from the attached screen grab that Madagascar seems to be liberally spread across all sorts of random locations even when I only asked for a keyword text search.
 

Attachments

  • Screenshot 2021-09-20 at 19.40.58.png
    Screenshot 2021-09-20 at 19.40.58.png
    651.4 KB · Views: 75
When I try to enter the keyword 'Madagascar' in the Enter Keywords panel, I get an internal error message popup saying:
?:0: attempt to index field 'parent' (a nil value)
This clearly indicates your keyword list is in an inconsistent state -- over the years, there have been scattered reports of similar symptoms. I've got in mind a way to clean it up and remove the inconsistency, but first let's check the keyword structure to make sure I understand what you're seeing:

1. In the Keyword List, go to Location > Africa Madagascar and click the triangle to the left of Madagascar to collapse it:

1632168040769.png


2. Hold down Opt and click the triangle again to expand Madagascar and all of its contained keywords:

1632168170687.png


3. Post a screenshot of the Keyword List panel showing Madagascar and all of its contained keywords, including the counts.

4. In the Keyword List panel, hover over the keyword Madagascar and click the right-arrow that magically appears to the right of the keyword. How many photos are now displayed? You can get an exact count of the displayed photos by looking at the top left of the filmstrip:

1632168435627.png


5. Do the menu command Metadata > Export Keywords and attach the exported .txt file here. If you're not comfortable in exposing your keyword list to the community, send it to me in a private message.
 

Attachments

  • 1632168134535.png
    1632168134535.png
    7.5 KB · Views: 88
You might encounter the "ghost keyword" corruption I described HERE (see the 3rd post). If it's the case, your catalog needs to be repaired manually to make the bug disappear.
 
I forgot about that thread -- it could well be the same problem you're facing. If you send the .lrcat catalog to me via Dropbox (private message me) I'll attempt the surgery on it. (Or Philippe might be willing to as well...)
 
You might encounter the "ghost keyword" corruption I described HERE (see the 3rd post). If it's the case, your catalog needs to be repaired manually to make the bug disappear.
Yes, reading your description my problem looks to be of a very similar nature.
I'm thinking it's a bug which was initiated by my merging of two very large catalogs into one, but the repair process is not obvious to me.
Peter
 
This clearly indicates your keyword list is in an inconsistent state -- over the years, there have been scattered reports of similar symptoms. I've got in mind a way to clean it up and remove the inconsistency, but first let's check the keyword structure to make sure I understand what you're seeing:

1. In the Keyword List, go to Location > Africa Madagascar and click the triangle to the left of Madagascar to collapse it:

View attachment 17154

2. Hold down Opt and click the triangle again to expand Madagascar and all of its contained keywords:

View attachment 17156

3. Post a screenshot of the Keyword List panel showing Madagascar and all of its contained keywords, including the counts.

4. In the Keyword List panel, hover over the keyword Madagascar and click the right-arrow that magically appears to the right of the keyword. How many photos are now displayed? You can get an exact count of the displayed photos by looking at the top left of the filmstrip:

View attachment 17157

5. Do the menu command Metadata > Export Keywords and attach the exported .txt file here. If you're not comfortable in exposing your keyword list to the community, send it to me in a private message.
I have carried out your points 1, 2, 3, and 4.
I will post the screen shot of the keywords under Madagascar (needed two shots, as its a long hierarchical list).
The exact count of the Madagascar keyword is 3,829. But that's only the 'legal' ones. There are many thousands of other instances as can be seen in the keyword tag panel when I select Keywords & Containing Keywords option, none of which I have entered myself, but they have bred in the software!
How do I private message you in here to send the entire keyword text file?
Peter
 

Attachments

  • Screenshot 2021-09-20 at 22.05.07.png
    Screenshot 2021-09-20 at 22.05.07.png
    264 KB · Views: 96
  • Screenshot 2021-09-20 at 22.06.43.png
    Screenshot 2021-09-20 at 22.06.43.png
    91.6 KB · Views: 97
John,
OK, I can now see how to send a private message to you, but I can't see how to attach the keyword text file to it. There's no 'attach files' box like there is in public messages.
Please advise.
Thank you.
Peter
 
I've attached a simple script that will test for the presence of the "ghost keyword" mentioned by Philippe. Download the script into your Downloads folder. Exit LR, start the Terminal app, and copy/paste this command line into Terminal:

Code:
sh ~/Downloads/diagnose.sh "/Users/john/Pictures/Lightroom/Test/Test.lrcat"

Use the path to your catalog's .lrcat file instead of mine. Copy/paste the two-line output in your reply here. It should look similar to:

Code:
id_local|id_global|dateCreated|genealogy|imageCountCache|includeOnExport|includeParents|includeSynonyms|keywordType|lastApplied|lc_name|name|parent
772|5A4EB9CD-117C-4384-BB3D-F92314474766|632622908.228749|/3772||1|1|1|||||
 
There's nothing suspicious or inconsistent in the Lightroom Keywords.txt file (which I removed from your post), which further points at Philippe's "ghost keyword" possibility. So definitely run "diagnose.sh".
 
There's nothing suspicious or inconsistent in the Lightroom Keywords.txt file (which I removed from your post), which further points at Philippe's "ghost keyword" possibility. So definitely run "diagnose.sh".
OK John, thanks for checking.
Peter
 
I'm willing to repair it, but first, Peter must send it to me !
John, Philippe, thank you for your help.
I'm willing to try the sqlite tool as supplied by John and if I struggle with it I will send the cat to Philippe.
The latest querk that I've noticed, apart from the ongoing Madagascar ghost keyword issue, is that if I enter a new keyword it pops up deep in the hierarchy in a seemingly random location several levels in, but consistently likes that location for each new keyword! I would expect it to simply sit in alphabetical order in the first level of hierarchy, of course.
 
OK, I failed at the first hurdle - when I used Terminal and the script as described by John it returned with "Error: Unable to open database. I tried several times to check for typos.
I will send the cat to Philipe: do you want just the .lrcat, or the .lrdata too?
Peter
 
Status
Not open for further replies.
Back
Top