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

Error : use of lowercased file name in pathIdCacheGetEntry method #72

Closed drissslim closed 1 year ago

drissslim commented 1 year ago

Hello, I'm facinf an issue during a synchronization of videos. The filename used to get the pathIdCacheGetEntry (I suppose) use a lowercased filename and then a nil is getting and an error was raised. Could you please help on that? Here an example and log file.

16:49:15, INFO : Upload of 'E:\Videos\2014\02\140923-MOV_0358.mp4' to 'Videos/2014/02/140923-MOV_0358.mp4' done. 16:49:35, INFO : Upload of 'E:\Videos\2014\02\140202-MOV_0359.mp4' to 'Videos/2014/02/140202-MOV_0359.mp4' done. 16:49:57, INFO : Upload of 'E:\Videos\2014\02\140923-MOV_0359.mp4' to 'Videos/2014/02/140923-MOV_0359.mp4' done. 16:50:21, INFO : Upload of 'E:\Videos\2014\02\140923-MOV_0360.mp4' to 'Videos/2014/02/140923-MOV_0360.mp4' done. 16:50:47, INFO : Upload of 'E:\Videos\2015\09\GOPR0460.MP4' to 'Videos/2015/09/GOPR0460.mp4' done. 16:53:43, INFO : Upload of 'E:\Videos\2015\09\GOPR0461.MP4' to 'Videos/2015/09/GOPR0461.mp4' done. 16:58:52, INFO : Upload of 'E:\Videos\2015\09\GOPR0462.MP4' to 'Videos/2015/09/GOPR0462.mp4' done. 17:06:20, INFO : Upload of 'E:\Videos\2015\09\GOPR0463.MP4' to 'Videos/2015/09/GOPR0463.mp4' done. 17:23:53, ERROR: pathIdCacheGetEntry(userid:0, path:'/Videos/2015/09/gopr0464.mp4') listItems('/Videos/2015/09') returned (803) 17:23:53, ERROR: pathIdCacheGetEntry(userid:0, path:'/Videos/2015/09') listSubfolders('/Videos/2015') returned (803) 17:23:53, ERROR: Upload of 'E:\Videos\2015\09\GOPR0464.MP4' to 'Videos/2015/09/GOPR0464.mp4' failed! 17:23:53, ERROR: pathIdCacheGetEntry(userid:0, path:'/Videos/2015/09') listSubfolders('/Videos/2015') returned (803) 17:23:53, ERROR: pathIdCacheGetEntry(userid:0, path:'/Videos/2015') listSubfolders('/Videos') returned (803) 17:23:54, ERROR: getFolderId(userid:0, path '/Videos') returns '' (after creating folder) 17:23:54, ERROR: getFolderId(userid:0, path '/Videos/2015') returns '' (after creating folder) 17:23:54, ERROR: pathIdCacheGetEntry(userid:0, path:'/Videos/2015') listSubfolders('/Videos') returned (803) 17:23:54, ERROR: getFolderId(userid:0, path '/Videos/2015/09') returns '' (after creating folder) 17:23:54, ERROR: pathIdCacheGetEntry(userid:0, path:'/Videos/2014/02/140923-mov_0358.mp4') listItems('/Videos/2014/02') returned (803)

I'm using the latest version.

Thanks for your help.

PhotoStatLr.log

flingo64 commented 1 year ago

The lowercased filename is not the issue: since Photos manages filename (not folders) case-insensitively, the pathIdCache stores all filenames as lowercase and compares them lowercased. I think the problem is caused by the fact that rendering of GOPR0464.mp4 took 17 minutes, now when the plugin starts the actual upload it first checks whether GOPR0464.mp4 is already avalaible in the target folder (because if so, it had to delete it before uploading the new version). Since the target folder and its parents have aged out in the cache meanwhile (5 minutes valdity), it tries to refill the cache via the listIttem() and listSubfolders() function recursevily. Unfortunately, all subsequent calls fail w/ errorcode 803. The most likely reason for that is that Photos session timed out (remember: 17 minutes no activities) and the plugin may probably need to re-login to continue. This is definitely something I have to check and fix.

On the other, you obviously upload rendered versions of your videos, not the original video. There may be good reasons for doing so (e.g. changing the resolution or trimming the video), but if you would upload the original version of the video, the render time for videos will decrease enormously and the Photos session timeout would probably not occuure.

Thanks for posting the issue!

flingo64 commented 1 year ago

I was able to reproduce the 803 error by adding a 900 second wait time between rendering and uploading. The plugin will now do a retry after a re-login if it receives a 803 in the listFolder functions. This issue is fixed in v7.3.2