# Negative.lua:223: attempt to index local 'i' (a nil value)

**URL:** <https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540>\
**Category:** Troubleshooting and Bugs\
**Created:** [August 24, 2019, 9:28pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540 "2019-08-24T21:28:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicnilov](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nicnilov/32/324_2.png) [@nicnilov](https://forums.negativelabpro.com/u/nicnilov)\
**Post date:** [August 24, 2019, 9:28pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/1 "2019-08-24T21:28:47Z")

</div>

I’m using NLP v.2.0.0 under Windows 7 (x64) in Lightroom 8.4. I have some B&W scans made using VueScan in multiexposure mode and saved as 16-bit Gray TIFF and VueScan RAW, in straight TIFF and also DNG, all saved by VueScan.

When I try to process either of them using NLP, I select either TIFF/JPEG Scan or Vuescan RAW DNG, put color mode to B&W and click on Convert Negative, I get this error at about 50-55% progress bar position.

I tried some other settings of color mode and source but the result is the same. Please let me know if you need more information.

**UPDATE:** I tried to process the same files under OSX, same Lightroom version and it worked well in with all NLP settings I tried.

---

<div class="post-metadata">

**Author:** ![StephenK](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@StephenK](https://forums.negativelabpro.com/u/StephenK)\
**Post date:** [August 25, 2019, 10:34am UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/2 "2019-08-25T10:34:59Z")

</div>

I have just installed V2 on a new laptop (Windows 10 (64 bit), Lightroom 8.4) and I’m getting exactly the same error when I try to convert anything.

---

<div class="post-metadata">

**Author:** ![JerryB](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@JerryB](https://forums.negativelabpro.com/u/JerryB)\
**Post date:** [August 25, 2019, 6:34pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/3 "2019-08-25T18:34:11Z")

</div>

I just downloaded and installed NLP v2 to evaluate for potential purchase and am getting the exact same error when trying to convert (also Windows 10 [64 bit], Lightroom 8.4).

---

<div class="post-metadata">

**Author:** ![nate](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nate/32/4_2.png) [@nate](https://forums.negativelabpro.com/u/nate)\
**Post date:** [August 26, 2019, 1:27pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/4 "2019-08-26T13:27:26Z")

</div>

Hi @JerryB and @StephenK,

Try the instructions in this link and let me know if that helps:

> [@SOLVED: "Negative.lua:708: attempt to perform arithmetic on field '?' (a nil value)](https://forums.negativelabpro.com/t/solved-negative-lua-attempt-to-perform-arithmetic-on-field-a-nil-value/108):
>
> If you are trying to convert a film negative scan in Negative Lab Pro, and you get this message, then read on for the solution! Negative Lab Pro depends on two key things to work: 1) the ability to analyze your negative image and 2) the ability to add metadata to your image about that analysis. If either of these things isn’t working properly with your system or Lightroom, you may see an error like this one when you try to convert an image: [negative%20lua%20708%20internal%20error] Depending…

Also, check the filename of the image you are trying to convert and ensure that are no symbols in the filename (in other words, the filename should be comprised of just numbers and letters). This specific filename issue should be resolved with v2.1, but in the meantime, if you encounter this, you can test by renaming the file and trying to convert again.

-Nate

---

<div class="post-metadata">

**Author:** ![JerryB](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@JerryB](https://forums.negativelabpro.com/u/JerryB)\
**Post date:** [August 26, 2019, 2:46pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/5 "2019-08-26T14:46:00Z")

</div>

Hi @Nate,

I tried the instructions at the link and uninstalling, moving, and reinstalling NLP in a location on the C Drive with universal write privileges does not solve the problem. I still get the exact same error message. The problem occurs on every image file that I try and there are no symbols in any of my file names unless you consider an underscore an symbol. In any event, I also tried removing the underscore and still got the same error message.

---

<div class="post-metadata">

**Author:** ![nate](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nate/32/4_2.png) [@nate](https://forums.negativelabpro.com/u/nate)\
**Post date:** [August 26, 2019, 4:09pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/6 "2019-08-26T16:09:25Z")

</div>

Hmm…

ok, could you possible link to a file giving you trouble? (Or if you don’t want to link, you can email me personally at [nate@natephotographic.com](mailto:nate@natephotographic.com))

Also, could you try installing in the ROOT of your C:\ drive? There is some weirdness with folder permissions in Windows, and I just want to rule that out.

Do you have Lightroom installed on a networked drive by chance?

I’m also interested if anyone found that NLP v2.0 worked ok with Lightroom 8.3 but are noticing problems starting now with Lightroom 8.4?

---

<div class="post-metadata">

**Author:** ![JerryB](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@JerryB](https://forums.negativelabpro.com/u/JerryB)\
**Post date:** [August 26, 2019, 5:01pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/7 "2019-08-26T17:01:41Z")

</div>

Interesting. I first installed your plugin in a subdirectory of “C:\program Files” that I successfully use for some of my other LR plugins (didn’t work) and, after your first message, I installed the plugin in a subdirectory of the folder of my C Drive that LR uses for installed plugins, “C:\Users\GB\AppData\Roaming\Adobe\Lightroom\Modules” (also didn’t work). After your last message, I created a NegativeLabPro folder at the root of my C Drive and installed a copy of your plugin in this folder and it now works. The problem has to be some sort of weirdness with folder permissions in Windows and what your plugin requires. I can understand a potential issue with its location in “C:\Program Files” but I have no clue why it wouldn’t run in my user/AppData/Roaming folder since those folders are specifically designed for storing program data. In any event, my problem is resolved. Thank your for your help. FYI, I stop my trial assessment and purchased the plugin.

---

<div class="post-metadata">

**Author:** ![Oliver](https://avatars.discourse-cdn.com/v4/letter/o/85f322/32.png) [@Oliver](https://forums.negativelabpro.com/u/Oliver)\
**Post date:** [August 26, 2019, 9:59pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/8 "2019-08-26T21:59:12Z")

</div>

Yep same problem. Downloaded the trial version, followed the advice above and below, still getting the **lua.223 error** every time. The plugin folder is in a NegativeLabPro folder placed in my C: root directory as mentioned by @JerryB. Tried renaming the file too, no luck. Tried placing it elsewhere. Tried renaming the photo file. Can’t seem to get it to work. Running Lightroom 6 on Win10.

---

<div class="post-metadata">

**Author:** ![StephenK](https://avatars.discourse-cdn.com/v4/letter/s/8e8cbc/32.png) [@StephenK](https://forums.negativelabpro.com/u/StephenK)\
**Post date:** [August 27, 2019, 10:08am UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/9 "2019-08-27T10:08:05Z")

</div>

Thanks Nate - creating a separate directory for the plugin in the root directory of C worked. It’s strange that I didn’t need to do this on my desktop and it worked fine? Perhaps a difference in permissions that I’m not aware of?

---

<div class="post-metadata">

**Author:** ![nicnilov](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nicnilov/32/324_2.png) [@nicnilov](https://forums.negativelabpro.com/u/nicnilov)\
**Post date:** [August 27, 2019, 12:56pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/10 "2019-08-27T12:56:54Z")

</div>

Suggestion to move the plugin folder outside of the protected `Program Files/Adobe/Adobe Lightroom Classic/` location worked. I compared the permissions on the plugin folder when under `Program Files` and outside and the difference appears to be in the `Authenticated Users` entry with `rwx` permissions which is missing when the plugin is placed under `Program Files`. Adding this permission to the plugin folder makes it work even when placed under `Program Files/Adobe/Adobe Lightroom Classic/`.

Another approach that worked for me is placing the plugin under `C:\Users\<UserName>\AppData\Roaming\Adobe\Lightroom\Modules` (as suggested also at [Adobe Forums](https://forums.adobe.com/message/9945155#9945155)). Note that in my case the `Modules` folder was missing and had to be created manually. After that though Lightroom has automatically found the plugin and it worked without errors.

There is still one other concern. Since my plugin was not registered yet on Windows, I tried to do that but the registration was not saved and the plugin was still in trial mode on the next Lightroom start. It only succeeded when starting Lightroom with Administrator priviledges and registering. It worked well with regular starts afterwards. This might be a part of the same permissions issue which this topic is about.

---

<div class="post-metadata">

**Author:** ![nate](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nate/32/4_2.png) [@nate](https://forums.negativelabpro.com/u/nate)\
**Post date:** [August 27, 2019, 1:25pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/11 "2019-08-27T13:25:22Z")

</div>

> [@nicnilov](#):
>
> Another approach that worked for me is placing the plugin under `C:\Users\<UserName>\AppData\Roaming\Adobe\Lightroom\Modules`

The only reason I don’t broadly recommend this is that I don’t believe this will work if you are saving your presets with your lightroom catalog (rather than the default location). So for about 10% of users, it won’t work as expected.

> [@nicnilov](#):
>
> Adding this permission to the plugin folder makes it work even when placed under `Program Files/Adobe/Adobe Lightroom Classic/` .

Good to know. I’m not really sure why this is only needed in some situations. I haven’t been able to replicate the permissions issue on my own Windows machine, no matter where I put it. Oh well, the ways of Windows are sometimes mysterious. 🙂

---

<div class="post-metadata">

**Author:** ![Oliver](https://avatars.discourse-cdn.com/v4/letter/o/85f322/32.png) [@Oliver](https://forums.negativelabpro.com/u/Oliver)\
**Post date:** [August 27, 2019, 5:07pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/12 "2019-08-27T17:07:09Z")

</div>

Hello, I tried your suggestions above, i.e the AppData\Roaming etc. path. No luck so far.

I noticed that once it’s placed in that path you can no longer remove it through Lightroom, the Plugin Manager “Remove” button being greyed out. As for why it doesn’t work, I’m guessing it’s most certainly folder permission related as I get the **lua:223** error on any photo, RAW, jpeg etc.

I’ve tried moving it to other folders, restarted Windows. I haven’t reinstalled Lightroom 6 yet though that will probably be the next step. I’ll keep the forum posted.

---

<div class="post-metadata">

**Author:** ![nate](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nate/32/4_2.png) [@nate](https://forums.negativelabpro.com/u/nate)\
**Post date:** [August 27, 2019, 5:34pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/13 "2019-08-27T17:34:46Z")

</div>

Try this:

**1) In Windows file explorer, navigate to where you have placed the NegativeLabPro.lrplugin folder that you are using in Lightroom. Right click on that folder.**

 ![1-right-click-nlp](https://canada1.discourse-cdn.com/flex029/uploads/negativelabpro/original/1X/46597a0d75702899b166d2819d3eba05e82afae6.png)

**2. Select "Properties"**

 ![2-select-properties](https://canada1.discourse-cdn.com/flex029/uploads/negativelabpro/original/1X/0175b3ffbef20b88868c5c777e65ea74ec1912e9.png)

**3. In the properties dialog, move to the “Security” tab. Select “Authenticated Users”, then click "Edit"**

 ![3-edit](https://canada1.discourse-cdn.com/flex029/uploads/negativelabpro/original/1X/2985b6f06b4e6521fba7ec41efcea92f33dc7fda.png)

**4. To the right of “Full Control” hit “Allow”. Then click "OK"**

 ![4-full-control](https://canada1.discourse-cdn.com/flex029/uploads/negativelabpro/original/1X/153478439a966aa6a318c43a5ca04d05fe35d244.png)

**5. Restart Lightroom (if it is open) and try again.**

---

<div class="post-metadata">

**Author:** ![Oliver](https://avatars.discourse-cdn.com/v4/letter/o/85f322/32.png) [@Oliver](https://forums.negativelabpro.com/u/Oliver)\
**Post date:** [August 27, 2019, 6:06pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/14 "2019-08-27T18:06:02Z")

</div>

Hi Nate, I tried your solutions, no luck. I’ll continue tinkering. But thanks for the quick reply!

---

<div class="post-metadata">

**Author:** ![nate](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nate/32/4_2.png) [@nate](https://forums.negativelabpro.com/u/nate)\
**Post date:** [August 27, 2019, 6:13pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/15 "2019-08-27T18:13:12Z")

</div>

Hmm… 🤔

And you’re sure that the file names do not contain any symbols?

You’re sure that the files you are trying to convert are available and not just previews? (For instance, if the original files are on an external hard drive that is not currently connected, that would cause an issue)

The only other thing I could think of is perhaps you have an anti-virus program that is not allowing it to run…

---

<div class="post-metadata">

**Author:** ![Oliver](https://avatars.discourse-cdn.com/v4/letter/o/85f322/32.png) [@Oliver](https://forums.negativelabpro.com/u/Oliver)\
**Post date:** [August 27, 2019, 6:29pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/16 "2019-08-27T18:29:49Z")

</div>

Yes, I thought of that too. My Anti-Virus is disabled, no luck on that front.

As for the file name, I DSLR scanned a picture yesterday, named it “Test”. As its Olympus raw format the file extension is .ORF  
Unless its the file format that’s throwing NLP off, though I’ve tried a bunch of JPEG’s and same story.  
I’m sure there’s a real simple answer to this 🤔

---

<div class="post-metadata">

**Author:** ![Oliver](https://avatars.discourse-cdn.com/v4/letter/o/85f322/32.png) [@Oliver](https://forums.negativelabpro.com/u/Oliver)\
**Post date:** [August 27, 2019, 6:31pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/17 "2019-08-27T18:31:41Z")

</div>

As for the the file location, the “Test.ORF” file is on my desktop. I tried putting it on D: drive, same story.

---

<div class="post-metadata">

**Author:** ![nate](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.negativelabpro.com/nate/32/4_2.png) [@nate](https://forums.negativelabpro.com/u/nate)\
**Post date:** [August 27, 2019, 6:41pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/18 "2019-08-27T18:41:31Z")

</div>

Hmm…

Could you go to “help \> system info” in Lightroom and copy/paste that info and PM to me?

Another thing you might try is going into the folder " NegativeLabPro.lrplugin/win" and double clicking “convert.exe” to see if anything on your system prevents that from running…

---

<div class="post-metadata">

**Author:** ![Oliver](https://avatars.discourse-cdn.com/v4/letter/o/85f322/32.png) [@Oliver](https://forums.negativelabpro.com/u/Oliver)\
**Post date:** [August 27, 2019, 6:54pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/19 "2019-08-27T18:54:53Z")

</div>

Convert.exe functions, as in a DOS script style window pops up, runs through and closes.

---

<div class="post-metadata">

**Author:** ![Oliver](https://avatars.discourse-cdn.com/v4/letter/o/85f322/32.png) [@Oliver](https://forums.negativelabpro.com/u/Oliver)\
**Post date:** [August 28, 2019, 7:09pm UTC](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540/20 "2019-08-28T19:09:36Z")

</div>

Well, I’ve tried the various suggestions, I even downloaded the sample RAW files on the Download page. Nothing doing. I’m almost positive its something that’s blocking the NLP plugin from correctly launching. Trouble is, what? 🧐

[Next page](https://forums.negativelabpro.com/t/negative-lua-attempt-to-index-local-i-a-nil-value/540.md?page=2)
