11 Replies Latest reply on Jan 15, 2017 8:29 PM by AbrahamFriedman

    LR Error "attempt to index a nil value"

    Level 1
      As of this evening, Lightroom has stopped working. At various times including startup (2x) I get a message saying "?:0: attempt to index a nil value". Then when the program is loaded, it appears to have an empty catalog.

      At first I thought the problem might be a corrupted catalog file. However, if I hold down ALT at launch and specify another catalog, or if I create a new one, I get the same results.

      Within the program, I see the message again when I switch modules to DEVELOP, or SLIDESHOW but not when I switch to WEB or PRINT. Once I've moved away from the LIBRARY module, any attempt to move back to it results in the message and staying on the same module I was on.

      I am running Windows XP Pro SP2. There is 2gb RAM on the system and 24gb free disk space on C.

      I tried UNINSTALLING the program then re-installing with the 2.1 update, but that made no difference.

      Something that may be related: I installed the MS .NET 3.5 framework in between the last time I used LR successfully and the first time I saw it fail. I don't know if there is a conflict there... everything else I've tried seems fine and I've got a BUNCH of software installed.
        • 1. Re: LR Error "attempt to index a nil value"
          Level 1
          The .NET framework shouldn't be a factor. I suspected your catalog at first, too, but your note that multiple catalogs exhibit this makes me suspicious of something in your preferences.

          What I'd suggest trying:
          1. Launch LR. Go to Edit > Preferences > Presets tab > click "Show Lightroom Presets Folder"
          2. In Win Explorer, rename the "Lightroom" presets folder to "Lightroom-x"
          3. Quit and relaunch LR. It will ask you to manually find your catalog.
          4. See if the problem went away.

          If that fixes the problem, I'd appreciate getting a copy of your problematic presets folder (most likely the prefs file) at jkmoch at adobe dot com.

          If it doesn't fix the problem, you'll probably want to get rid of the new Lightroom presets folder that was recreated when you launched at step 3, and restore the old -x one. Then we'll have to look at your catalogs.
          • 2. Re: LR Error "attempt to index a nil value"
            Level 1
            Julie, that did the trick!

            I'll email you a ZIP file with the old presets folder right away.

            Thanks very much!
            • 3. Re: LR Error "attempt to index a nil value"

              Had the same thing happen to me, but I thought it had something to do with the size of my catalog. I was creating a new catalog with LR3B and it was creating 1:1 previews when it hung at 34%. I have 340GB+ pictures that I wanted in one catalog (don't know if that is best practices or not, just what I have been doing). I had to kill the program (end task) and when I reopened it I got this same error as the previous gentleman: "?:0:attempt to index a nill value"


              I did what you recommended above and it fixed the issue, but upon restarting LR3B it didn't ask me for the location of the catalog. All my pictures are there, but my Develop Presets and possibly other things are not, oh well.


              If you want my Prefs folder let me know.



              • 4. Re: LR Error "attempt to index a nil value"
                Gary=Rowe Level 1

                I get this message randomly as I delete unused keywords - when I try a second time they ususally delete Ok ... but it is annoying!


                I just ignore it, but when my wife gets stuff like this she doesn't know what to do - and usually then I get the grief for telling her to use shoddy s/w :-(



                • 5. Re: LR Error "attempt to index a nil value"

                  While uploading images to smugmug for a wedding I just did I got this message.  It really freaked me out so I just started backing up all my stuff.  Here is my concern, is it in one of my presets that I used to edit my images?  Is there a way to figure out which preset it is.  I have only 347 images left and I could look for the presets left that are on those photos.  Maybe I could then just delete that preset instead of all my wonderful presets?  I haven't had any issues but an error message when my computer is trying to finish the last 347 images of 1580 already uploaded.  LR still seems to be working just fine.  So I went in and exported all the images to a folder on my desk top because I don't have a current back-up....lessoned learned and cross your fingers for me.


                  Any explanations or advise would be so amazing...thank you ahead of time.

                  • 6. Re: LR Error "attempt to index a nil value"
                    jpsnuffy@gmail.com Level 1


                         If you follow the advice of the previous poster Julie Kmoch and then gradualy add presets back in one at a time you might be able to find the one that is causing the issue. I may be guessing, but I believe the issue has something to do with either an incompatible Preset setting (eg a older preset in newer version of LR) or a corrupt Preset.


                    Say you bought LR2 and imported a bunch of Presets from the internet, cuz 'Hey these effects are cool and I don't have to recreate the wheel', and then you upgraded to LR3 (not a clean install) and now one of the Presets that calls a certain slider setting or value that is different in LR3 doesn't work anymore. This might be why it throws the error, but again I am just speculating.


                    Location of LR Preset folder in Windows Vista/ Windows 7

                    C:/Users/<YourUserName>/AppData/Roaming/Adobe/Lightroom/Develop Presets


                    If you do not see the folder AppData, you may need to change the settings in Windows Explorer to 'Show Hidden Files and Folders'. To do that in Windows Vista/ Windows 7, open a Windows Explorer window, Click on Organize, then Foler and Search Options. Then click on the View tab and select the option button next to Show hidden files, folders and drives.


                    Hope this helps a bit,



                    • 7. Re: LR Error "attempt to index a nil value"

                      Help! I tried this and now my catalog has reverted to a previous time where thousands of images are not showing up...I renamed the preferences folder. it didn`t work so i changed it back and now I appear to have lost thousands of images from the catalog..any ideas anyone??

                      • 8. Re: LR Error "attempt to index a nil value"

                        I just received the same message when I tried to upload to one of my SmugMug pages. I was able to upload the same images to my other SmugMug page with no problems. Any suggestions? everything else works fine

                        • 9. Re: LR Error "attempt to index a nil value"
                          johnrellis Most Valuable Participant

                          Make sure you have the most recent version of the plugin. Go to File > Plug-in Manager, select the Smugmug plugin, and then scroll the right column to the Status pane, where you can see the version number. The most recent version is 3.0.9: How do I install or update the Lightroom plugin? | SmugMug

                          • 10. Re: LR Error "attempt to index a nil value"
                            sportshots Level 1

                            I have the most recent, but it says 'installed may not work'

                            But I'm uploading to my other page, they both use the same plugin right.

                            • 11. Re: LR Error "attempt to index a nil value"

                              I got this error when I created a collection using the Facebook plugin. When I created the collection I had a dash in the name. After deleting the collection and recreating it without a dash everything was fine. It seems that special characters can sometimes trip app Lightroom.