flingo64 / PhotoStation-Upload-Lr-Plugin

Photo StatLr (aka PhotoStation Upload) is a Lightroom Publish and Export Service Plugin that enables the export /publishing of photos and videos from Lr to a Synology Photo Station. It uploads the photos/videos and all required thumbnails. It can download comments and ratings and do a real two-way synch of various metadata (tags, ratings, labels).
http://messmer-online.de/index.php/software/11-photo-statlr
GNU General Public License v3.0
209 stars 21 forks source link

PSPhotosAPI.lua 852: bad argument #1 to 'format' (number expected, got nil) - Getting this error when try to publish #68

Closed drissslim closed 1 year ago

drissslim commented 1 year ago

Hi, I'm using the last version of plugin and I'm getting this error in popup window when try to publish my photos

An internal error has occured: [string "PSPhotosAPI.lua"]: 852: bad argument #1 to 'format' (number expected, got nil) Any idea how to fix that? Thank you.

Screenshot 2022-12-13 at 08 56 28 Screenshot 2022-12-13 at 10 28 19
flingo64 commented 1 year ago

Hmm, that's an errror in the error-message print function. :-( Will be fixed in the next release. Meanwhile, you may fix it in your installed plugin, so you can see avoid the exception. In file PSPhotosAPI.lua, change line 852 from: return string.format("ErrorCode: %d", errorCode) to : return string.format("ErrorCode: %d", ifnil(errorCode, 100)) This will then return an 'Unknown error' message so you can chase the real problem

drissslim commented 1 year ago

Hi, I'm getting other errors related to nil value also at line 1034 in the same file. Please find in attachment the error trace. Thank you. Screenshot 2022-12-13 at 23 25 49

Screenshot 2022-12-13 at 23 25 39
flingo64 commented 1 year ago

Wow, two bugs in one day: not bad!

In PSPhotosAPI.lua, change line 1076 from: elseif not Photos_deleteFolder (currentFolderPath) then to: elseif not Photos_deleteFolder (h, currentFolderPath) then

Will be fixed in the next release.

Thanks for reporting!