When trying to delete photos from the hard drive in Adobe Lightroom Classic, following error message is displayed:
An internal error has occurred: ?:0: attempt to index a nil value
The photos get deleted, but Lightroom hangs for a little while, and in some instances crashes.
The issue was caused by LogiOptions plugin that gets silently installed with Logitech Options software.
Disabling the plugin fixed the issue (File > Plugin Manager, select LogiOptions and click Disable).
If this doesn't resolve the issue, you may need to delete the plugin completely. To do this, click Show in Explorer in the Lightroom Plugin Manager and then delete LogiOptionLr.lrplugin folder. Restart Lightroom for changes to take effect.
Windows 10 Pro
Adobe Lightroom Classic 9.3
Logitech Options 8.20