Kodi Community Forum

Full Version: Library Auto Updater - Version 1.1.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
So I have a cleanup happen when my files shares were offline and now this mod won't add any of the TV Episodes or movies back.  Anyone know how to get them added back?
When a cleanup runs and your file storage is offline you usually get a message stating "folder is offline, do you want to ignore or remove these files". If you remove them it also removes the source as a scan target in Kodi. This isn't something the addon does, these are core Kodi prompts regarding the cleanup process. 

I'd check that your sources are set as movie or tv show enabled scan targets. Keep in mind this addon is just telling Kodi to kick off it's scan process via a timer. The entire library management system is a core Kodi component. This isn't adding any functionality to that, just running a timer to call the update process.
After one of Kodi updates the auto library updater stopped working. When checking the logs I only can find the below trace. I tried reinstalling the addon and leaving defaults values with no luck resolving the issue. Can you pelase help? Where should I look first? I see others resolving it by reinstalling Kodi but there must be another way... Thanks in advance.

EDIT: The library updater worked when restarting Kodi so it seems the issue is with the scheduler.

 13:32:08.271 T:139927039047424 NOTICE: service.libraryautoupdate-1.0.2 : update timers
13:32:08.271 T:139927039047424 NOTICE: service.libraryautoupdate-1.0.2 : Creating timer for Video Library
13:32:08.272 T:139927039047424 NOTICE: service.libraryautoupdate-1.0.2 : Creating timer for Music Library
13:32:08.272 T:139927039047424 NOTICE: service.libraryautoupdate-1.0.2 : Creating timer
13:32:08.272 T:139927039047424 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ValueError'>
Error Contents: Exactly 5 or 6 columns has to be specified for iteratorexpression.
Traceback (most recent call last):
File "/home/jesussb/.kodi/addons/service.libraryautoupdate/manual.py", line 5, in <module>
autoUpdate = AutoUpdater()
File "/home/jesussb/.kodi/addons/service.libraryautoupdate/service.py", line 38, in __init__
self.createSchedules(True)
File "/home/jesussb/.kodi/addons/service.libraryautoupdate/service.py", line 190, in createSchedules
aJob.next_run = self.calcNextRun(aJob.expression, self.last_run)
File "/home/jesussb/.kodi/addons/service.libraryautoupdate/service.py", line 216, in calcNextRun
cron = croniter(cronExp,startTime)
File "/home/jesussb/.kodi/addons/service.libraryautoupdate/resources/lib/croniter.py", line 60, in __init__
raise ValueError(self.bad_length)
ValueError: Exactly 5 or 6 columns has to be specified for iteratorexpression.
-->End of Python script error report<--
^^^ No ideas? If this is something discussed before I tried searching but I'm not sure what I'm looking for... I just need to be pointed in the right direction...
Same here. I checked after a power cut last night. Rebooted just to be on the safe side. Noticed an error popup which suggested a log check. Very similar error.

11:07:29.838 T:1707410176   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.KeyError'>
                                            Error Contents: ('9/21',)
                                            Traceback (most recent call last):
                                              File "/home/osmc/.kodi/addons/service.libraryautoupdate/default.py", line 6, in <module>
                                                AutoUpdater().runProgram()
                                              File "/home/osmc/.kodi/addons/service.libraryautoupdate/service.py", line 38, in __init__
                                                self.createSchedules(True)
                                              File "/home/osmc/.kodi/addons/service.libraryautoupdate/service.py", line 190, in createSchedules
                                                aJob.next_run = self.calcNextRun(aJob.expression, self.last_run)
                                              File "/home/osmc/.kodi/addons/service.libraryautoupdate/service.py", line 216, in calcNextRun
                                                cron = croniter(cronExp,startTime)
                                              File "/home/osmc/.kodi/addons/service.libraryautoupdate/resources/lib/croniter.py", line 93, in __init__
                                                t = self.ALPHACONV[i][t.lower()]
                                            KeyError: ('9/21',)
                                            -->End of Python script error report<--

Any suggestions would be welcome.
This worked for me:

rm /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/service.libraryautoupdate/custom_paths.json
The error in both those statements is in the cron parsing utility. Probably an issue with a custom cron statement in one of your timers.
I am getting this error the last few days and library is not auto updating.
Any idea?

15:15:44 T:2083559608 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: Error Contents: Exactly 5 or 6 columns has to be specified for iteratorexpression. Traceback (most recent call last): File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.libraryautoupdate/manual.py", line 5, in autoUpdate = AutoUpdater()
Same problem as those above, probably an issue with one of your cron settings. If you're using custom cron syntax anywhere please check it. 

This hasn't been an issue in all the years I've had this addon available but for some reason it's suddenly tripping up lots of people. I'm currently looking in to ways to fail more gracefully by catching the cron syntax error and giving the user some more valid info on what is going on there.
Will the add-on run if no Kodi profile is logged in?  I have a Vero 4k and its on all the time, but i use a screensaver add-on to automatically log out any profile after 10 minutes of idle - this is because i have a kids profile and an adult profile...
I'm guessing "no" since Kodi won't know which library to update. The Scan function call doesn't have a parameter for which profile, it just does whatever one is logged in. Without one I'm not sure it will do anything.
I'm running a fresh install of Milhouse's LE v18 build for several weeks now, this plugin has never functioned. I have made no changes to the plugin other than changing the update delay to 4 hours.
I had previously been using this plugin for years before I started with a clean install again.

This is the only error I'm finding in the logs as well.

20:08:17.537 T:139881296680704  NOTICE: service.libraryautoupdate-1.0.2 : Update Library Service starting...
20:08:17.546 T:139881296680704  NOTICE: service.libraryautoupdate-1.0.2 : update timers
20:08:17.779 T:139881296680704  NOTICE: service.libraryautoupdate-1.0.2 : Creating timer for Video Library
20:08:17.788 T:139881296680704  NOTICE: service.libraryautoupdate-1.0.2 : Creating timer for Music Library
20:08:17.828 T:139881296680704  NOTICE: service.libraryautoupdate-1.0.2 : Creating timer smb://FREENAS/zpool0/media/movies/
20:08:17.928 T:139881296680704   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: Exactly 5 or 6 columns has to be specified for iteratorexpression.
                                            Traceback (most recent call last):
                                              File "/storage/.kodi/addons/service.libraryautoupdate/default.py", line 6, in <module>
                                                AutoUpdater().runProgram()
                                              File "/storage/.kodi/addons/service.libraryautoupdate/service.py", line 38, in __init__
                                                self.createSchedules(True)
                                              File "/storage/.kodi/addons/service.libraryautoupdate/service.py", line 190, in createSchedules
                                                aJob.next_run = self.calcNextRun(aJob.expression, self.last_run)
                                              File "/storage/.kodi/addons/service.libraryautoupdate/service.py", line 216, in calcNextRun
                                                cron = croniter(cronExp,startTime)
                                              File "/storage/.kodi/addons/service.libraryautoupdate/resources/lib/croniter.py", line 60, in __init__
                                                raise ValueError(self.bad_length)
                                            ValueError: Exactly 5 or 6 columns has to be specified for iteratorexpression.
                                            -->End of Python script error report<--
Looks like an error with cron syntax. Check any custom timers or cron syntax edits you have made. I have completed the code for alerting to cron syntax errors more specifically as settings are parsed but that probably won't hit the repo until Leia is released. That error is related to cron syntax parsing specifically though.
@robweber, I have no custom cron syntaxes, this was a fresh install, and i then went through and selected 'revert to default' (or however it is phrased) on each setting page. The script still fails.
Is there a settings file I can look at, and paste here for review.
I also downloaded the library update addon apart from auto update at start, but the only way movies can be removed is by hand. Am I missing something ?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32