In LR 7.5, the array returned by LrLrApplication.developPresetFolders() includes buggy fake folder objects intended to represent separator rows in the user interface. Invoking folder:getPath() on one of these bogus objects raises the internal error:
?:0: attempt to index field '_pathForFolder' (a nil value)
This affects any plugin that attempts to access the develop preset folders. In particular, it broke a DxO plugin and my own Fix Presets plugin (which fixes many other preset bugs):
https://forums.adobe.com/thread/2528220
https://feedback.dxo.com/t/export-to-dxo-broken-after-update-to-lr-7-5/4514
https://forums.adobe.com/thread/2527232
http://www.johnrellis.com/lightroom/fixpresets.htm
The workaround is to detect such bogus objects by calling folder:getPath() and trapping any error with pcall().
Details:
Here are the results of calling folder:getName() on the array of preset folders:
RackMultipart2018082536816b11n-88fba7e7-2cc5-46d8-b6e1-a5e00263fec2-1226163259.png
Note that the bogusly named folders correspond to the presence of separate rows in Develop's Preset panel.
Here's the result of calling folder:getPath() on the second (bogus) array element:
RackMultipart2018082529639s8lp-48e6c633-6dbf-49de-90ed-69212d0e72af-56975145.png