Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 32
Library Auto Updater - Version 1.1.0
Hi,

I am sorry if this is obvious to most but I am very new to this... I have read the forums and am not getting very far... I am trying to auto-clean my library after an update and messing around with the cron timers to fine tune this but although the update part works as expected I am not having any joy with the cleaning part... here is the error in my log file...

Thanks for looking...


11:57:55 T:14252 NOTICE: service.libraryautoupdate: update timers
12:00:00 T:14252 NOTICE: service.libraryautoupdate: Starting network check
12:00:00 T:14252 NOTICE: service.libraryautoupdate: Clean Video Library
12:00:00 T:14252 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: ('sources',)
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\default.py", line 6, in <module>
AutoUpdater().runProgram()
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\service.py", line 55, in runProgram
self.evalSchedules()
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\service.py", line 86, in evalSchedules
self.cleanLibrary(cronJob.command)
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\service.py", line 267, in cleanLibrary
for source in response['result']['sources']:
KeyError: ('sources',)
-->End of Python script error report<--
12:00:28 T:7500 NOTICE: Thread Background Loader start, auto delete: false
Reply
The JSONRPC server is not returning a valid result. Not sure why this is the case, a little earlier in the code there is a check for an error response so it returned something, just not what was expected.

What version of XBMC are you using? I can tell from the paths in your log that it is a Windows OS. The return value in both Eden and Frodo should be the same but I'd have to double check if you're not on Frodo that is the case. If you know anything about Python you could try adding the line

Code:
utils.log(response['result'])

Put this on line 266 of the service.py file. It will log the result of the JSON response. Please post it back here. If you have trouble adding the line I can post a link to a modified service.py file for you to replace the original with, but it is a pretty simple addition so hopefully you don't have any issues with it.
Reply
Many Thanks for the reply, I am afraid I know nothing of Python (first time I heard of it was when copying/pasting the error log on here!)

I am running Frodo 12.2 and using mysql database on WHS2011 if that makes a difference? the scanner is ok to add new movies/music it is only the clean that is causing the problem...
Reply
Not a problem, turns out the line I have you wouldn't have worked anyway Smile forgot the need to convert the dict object to a string. Here is a link to a modified version of service.py that has the correct log line added. please put it in the addon directory (C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\) and overwrite the old one. Then re-run the addon to generate the error message again. you should see a line similar to the following in your log:

Code:
service.libraryautoupdate: {'sources': [{'file': 'C:\\Dropbox\\videos\\', 'label': 'videos'}], 'limits': {'start': 0, 'total': 1, 'end': 1}}

https://dl.dropboxusercontent.com/u/11963637/service.py
Reply
Hi Mate,

I have done what you said and here is a copy of the log file... many thanks for your time :-)

00:04:16 T:22104 NOTICE: -----------------------------------------------------------------------
00:04:16 T:22104 NOTICE: Starting XBMC (12.2 Git:20130502-32b1a5e), Platform: Windows Server 2008 R2 SP1 64-bit, build 7601. Built on May 2 2013 (compiler 1600)
00:04:16 T:22104 NOTICE: Intel® Core™ i3-2100 CPU @ 3.10GHz
00:04:16 T:22104 NOTICE: Desktop Resolution: 1920x1080 32Bit at 60Hz
00:04:16 T:22104 NOTICE: Running with administrator rights
00:04:16 T:22104 NOTICE: Aero is disabled
00:04:16 T:22104 NOTICE: special://xbmc/ is mapped to: C:\Program Files (x86)\XBMC
00:04:16 T:22104 NOTICE: special://xbmcbin/ is mapped to: C:\Program Files (x86)\XBMC
00:04:16 T:22104 NOTICE: special://masterprofile/ is mapped to: C:\Users\Administrator\AppData\Roaming\XBMC\userdata
00:04:16 T:22104 NOTICE: special://home/ is mapped to: C:\Users\Administrator\AppData\Roaming\XBMC\
00:04:16 T:22104 NOTICE: special://temp/ is mapped to: C:\Users\Administrator\AppData\Roaming\XBMC\cache
00:04:16 T:22104 NOTICE: The executable running is: C:\Program Files (x86)\XBMC\XBMC.exe
00:04:16 T:22104 NOTICE: Local hostname: TROOPERSERVER
00:04:16 T:22104 NOTICE: Log File is located: C:\Users\Administrator\AppData\Roaming\XBMC\xbmc.log
00:04:16 T:22104 NOTICE: -----------------------------------------------------------------------
00:04:16 T:22104 NOTICE: No Devices found - retry: 5
00:04:18 T:22104 NOTICE: No Devices found - retry: 4
00:04:20 T:22104 NOTICE: No Devices found - retry: 3
00:04:22 T:22104 NOTICE: No Devices found - retry: 2
00:04:24 T:22104 NOTICE: No Devices found - retry: 1
00:04:26 T:22104 NOTICE: Found 0 Lists of Devices
00:04:26 T:22104 NOTICE: load settings...
00:04:26 T:22104 NOTICE: special://profile/ is mapped to: special://masterprofile/
00:04:26 T:22104 NOTICE: loading special://masterprofile/guisettings.xml
00:04:26 T:22104 NOTICE: Getting hardware information now...
00:04:26 T:22104 NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
00:04:26 T:22104 NOTICE: Loaded playercorefactory configuration
00:04:26 T:22104 NOTICE: Loading player core factory settings from special://masterprofile/playercorefactory.xml.
00:04:26 T:22104 NOTICE: special://masterprofile/playercorefactory.xml does not exist. Skipping.
00:04:26 T:22104 NOTICE: No settings file to load (special://xbmc/system/advancedsettings.xml)
00:04:26 T:22104 NOTICE: Loaded settings file from special://profile/advancedsettings.xml
00:04:26 T:22104 NOTICE: Contents of special://profile/advancedsettings.xml are...
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.0.4</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmcvideo</name>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.0.4</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmcmusic</name>
</musicdatabase>
</advancedsettings>
00:04:26 T:22104 WARNING: VIDEO database configuration is experimental.
00:04:26 T:22104 NOTICE: Getting hardware information now...
00:04:26 T:22104 NOTICE: Default DVD Player: dvdplayer
00:04:26 T:22104 NOTICE: Default Video Player: dvdplayer
00:04:26 T:22104 NOTICE: Default Audio Player: paplayer
00:04:26 T:22104 NOTICE: Disabled debug logging due to GUI setting. Level 0.
00:04:26 T:22104 NOTICE: Log level changed to 0
00:04:26 T:22104 NOTICE: Loading media sources from special://masterprofile/sources.xml
00:04:26 T:22104 ERROR: CAESinkWASAPI::Initialize: Could not retrieve the default WASAPI audio endpoint. - (null)
00:04:26 T:22104 ERROR: CAESinkWASAPI::Initialize: WASAPI initialization failed.
00:04:26 T:22808 NOTICE: Thread CSoftAE start, auto delete: false
00:04:27 T:22104 NOTICE: Running database version Addons15
00:04:28 T:18316 NOTICE: Thread XBMC Peripherals start, auto delete: false
00:04:28 T:20580 NOTICE: Previous line repeats 1 times.
00:04:28 T:20580 NOTICE: Thread CRemoteControl start, auto delete: false
00:04:28 T:22104 NOTICE: Found screen: Dummy Monitor on RDPDD Chained DD, adapter 0.
00:04:28 T:22104 NOTICE: Primary mode: 1920x1080 @ 60.00 - Full Screen
00:04:28 T:22104 NOTICE: Additional mode: 1920x1080 @ 60.00 - Full Screen
00:04:28 T:22104 NOTICE: Checking resolution 15
00:04:31 T:22104 NOTICE: Running database version Addons15
00:04:31 T:22104 NOTICE: Running database version ViewModes4
00:04:31 T:22104 NOTICE: Running database version Textures13
00:04:31 T:22104 NOTICE: Running database version xbmcmusic32
00:04:31 T:22104 NOTICE: Running database version xbmcvideo75
00:04:31 T:22104 NOTICE: Running database version TV22
00:04:31 T:22104 NOTICE: Running database version Epg7
00:04:31 T:22104 NOTICE: initializing playlistplayer
00:04:31 T:22104 NOTICE: DONE initializing playlistplayer
00:04:35 T:15552 NOTICE: Thread XBPyThread start, auto delete: false
00:04:36 T:22104 NOTICE: Previous line repeats 3 times.
00:04:36 T:22104 NOTICE: initialize done
00:04:36 T:11044 NOTICE: Thread XBPyThread start, auto delete: false
00:04:36 T:15552 NOTICE: -->Python Interpreter Initialized<--
00:04:36 T:16896 NOTICE: -->Python Interpreter Initialized<--
00:04:36 T:10392 NOTICE: -->Python Interpreter Initialized<--
00:04:36 T:18868 NOTICE: -->Python Interpreter Initialized<--
00:04:36 T:11044 NOTICE: -->Python Interpreter Initialized<--
00:04:36 T:22104 NOTICE: Running the application...
00:04:36 T:22104 NOTICE: ES: Starting event server
00:04:36 T:21524 NOTICE: Thread CEventServer start, auto delete: false
00:04:36 T:21524 NOTICE: ES: Starting UDP Event server on 0.0.0.0:9777
00:04:36 T:21524 NOTICE: UDP: Listening on port 9777
00:04:36 T:21412 NOTICE: Thread CTCPServer start, auto delete: false
00:04:36 T:18092 NOTICE: Thread Jobworker start, auto delete: true
00:04:36 T:21432 NOTICE: Thread CFileCache start, auto delete: false
00:04:40 T:19780 NOTICE: Previous line repeats 1 times.
00:04:40 T:19780 NOTICE: Thread Jobworker start, auto delete: true
00:04:40 T:21776 NOTICE: Thread XBPyThread start, auto delete: false
00:04:40 T:21404 NOTICE: Thread Jobworker start, auto delete: true
00:04:40 T:2860 NOTICE: Thread CAlarmClock start, auto delete: false
00:04:40 T:10112 NOTICE: Thread Jobworker start, auto delete: true
00:04:40 T:16896 NOTICE: Artwork Downloader: ## Service - Run at startup: False
00:04:40 T:16896 NOTICE: Artwork Downloader: ## Service - Delayed startup: minutes
00:04:40 T:16896 NOTICE: Artwork Downloader: ## Service - Run as service: False
00:04:40 T:16896 NOTICE: Artwork Downloader: ## Service - Time: :00
00:04:41 T:11044 NOTICE: StorageServer Module loaded RUN
00:04:41 T:11044 NOTICE: StorageClient-2.5.0 Starting server
00:04:41 T:11044 NOTICE: StorageServer-2.5.0 Storage Server starting C:\Users\Administrator\AppData\Roaming\XBMC\userdata\addon_data\script.common.plugin.cache\commoncache.db
00:04:42 T:21776 NOTICE: -->Python Interpreter Initialized<--
00:04:42 T:14596 NOTICE: Thread CRssReader start, auto delete: false
00:04:48 T:21924 NOTICE: Thread Background Loader start, auto delete: false
00:05:20 T:16116 NOTICE: Previous line repeats 6 times.
00:05:20 T:16116 NOTICE: Thread XBPyThread start, auto delete: false
00:05:20 T:18536 NOTICE: Thread Background Loader start, auto delete: false
00:05:20 T:16116 NOTICE: -->Python Interpreter Initialized<--
00:05:20 T:16116 NOTICE: service.libraryautoupdate: Update Library Service starting...
00:05:20 T:16116 NOTICE: service.libraryautoupdate: update timers
00:06:02 T:16116 NOTICE: Previous line repeats 1 times.
00:06:02 T:16116 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: ('*1',)
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\service.py", line 386, in onSettingsChanged
self.update_settings()
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\service.py", line 121, in createSchedules
aSchedule.next_run = self.calcNextRun(aSchedule.expression,time.time())
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\service.py", line 211, in calcNextRun
cron = croniter(cronExp,startTime)
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\resources\lib\croniter.py", line 93, in __init__
t = self.ALPHACONV[i][t.lower()]
KeyError: ('*1',)
-->End of Python script error report<--
00:06:13 T:4696 NOTICE: Thread Background Loader start, auto delete: false
00:06:48 T:16116 NOTICE: Previous line repeats 4 times.
00:06:48 T:16116 NOTICE: service.libraryautoupdate: update timers
00:10:00 T:16116 NOTICE: Previous line repeats 1 times.
00:10:00 T:16116 NOTICE: service.libraryautoupdate: Starting network check
00:10:00 T:16116 NOTICE: service.libraryautoupdate: Clean Video Library
00:10:00 T:16116 NOTICE: service.libraryautoupdate: {'limits': {'start': 0, 'total': 0, 'end': 0}}
00:10:00 T:16116 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: ('sources',)
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\default.py", line 6, in <module>
AutoUpdater().runProgram()
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\service.py", line 55, in runProgram
self.evalSchedules()
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\service.py", line 86, in evalSchedules
self.cleanLibrary(cronJob.command)
File "C:\Users\Administrator\AppData\Roaming\XBMC\addons\service.libraryautoupdate\service.py", line 268, in cleanLibrary
for source in response['result']['sources']:
KeyError: ('sources',)
-->End of Python script error report<--
Reply
According to the first error there is something wrong with one of your cron statements. There needs to be a space between each set for valid cron syntax (ie 0 0 * * *). That isn't what is going on with your cleaning issue, just something I noticed.

According to the result returned by the JSON GetSources method this is what is in your returned sources:

Code:
00:10:00 T:16116 NOTICE: service.libraryautoupdate: {'limits': {'start': 0, 'total': 0, 'end': 0}}

There should be a key called "sources" that has all of your source paths listed. Since there isn't that is why the verify paths function fails. Assuming you have a video path setup to scan, this method should return a value. Can you confirm that your sources.xml file contains a video path? If it does then this may actually be a JSONRPC bug that is causing this function to fail. If you can include the contents of your sources.xml document I think we could post this example to the Trac bug tracker and see what the XBMC devs have to say about this function not returning the right values.
Reply
Hi,

I have searched my entire hard drive for sources.xml with no results, I have not set any video paths as I use a mysql setting in advancedsettings.xml which is pointing at my whs2011 could this be the problem? I don't want to set paths manually that may conflict with my mysql settings?

Thank you
Reply
Even with mysql as your database you should still have a sources.xml file. Mysql only stores the scraped movie/tv show information. The sources.xml file is where xbmc actually stores the sources you've defined on the system as valid video paths. Here is the wiki page for a little more information:

http://wiki.xbmc.org/index.php?title=Use...ources.xml

If you are using windows 7 this path should be C:\Users\{Username}\AppData\Roaming\XBMC\userdata

I also see in your log file that it is loading a sources.xml file (if there is anything in here I can't say):
Code:
00:04:26 T:22104 NOTICE: Loading media sources from special://masterprofile/sources.xml

I guess the important question here is have you actually defined any sources on your xbmc install? do you have movies/tv shows available that you can browse for in Files mode? If you could post the contents of this file it would determine if JSONRPC is functioning correctly or if it is your sources setup.
Reply
Hi,

It is all working perfectly now :-)

I did not have the sources.xml file at all so I added my movie folder and set XBMC to not scan and also not to add it to any databases and now the scanner is working perfectly! it seems it only needed to see the path and could not use the mysql database thank you so much for all your help :-)
Reply
Hi,

addon works if the system is running. When it comes out of standby it stops saying "Preparing..." and I need to reboot. On restart, the update process then runs as expected. The server containing the files is running 24/7, but the disks may be spun down. Normally, XBMC has no problems with that, just waiting until they are up.

I've read a lot here about paths not being ready, but normally the spindown does not make any problems.

Any other tips?

Thanks
Reply
(2013-05-28, 19:35)Novgorod Wrote: Hi,

addon works if the system is running. When it comes out of standby it stops saying "Preparing..." and I need to reboot. On restart, the update process then runs as expected. The server containing the files is running 24/7, but the disks may be spun down. Normally, XBMC has no problems with that, just waiting until they are up.

I've read a lot here about paths not being ready, but normally the spindown does not make any problems.

Any other tips?

Thanks

Sorry to say what you are seeing most likely has nothing to do with the addon. When it comes out of standby and you see the library scanner pop up with "Preparing", that is the addon working. Once the addon calls the UpdateLibrary() command the internal xbmc library scanner takes over and does the rest. As long as this function is being called the addon has done its job. My guess is that there is something about the network connectivity of your host when it comes back up that the library scanner can't get access to the network. It could just be a timing issue that the scanner can't resolve even when the network does eventually return.

Regarding the paths not being ready, those statements are probably more to do with library cleaning than library scanning. The addon can do a verify on all of your sources before a library clean operation, and if one is down will not call the CleanLibrary() function. This check does not happen on a database update.
Reply
Known issue
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
I am having odd behavior in the last few weeks. The auto-updater won't update my library - but if i go to the video folder and say scan for new content it'll update fine.

In my logs I see

07:39:30 T:139924497970944 WARNING: No information found for item 'nfs://10.2.1.100/volume1/media-import/Movies/Archive/Christmas/TheFamilyStone-587288-0.mp4', it wo n't be added to the library.
07:40:27 T:139924497970944 WARNING: Process directory 'nfs://10.2.1.100/volume1/media-import/Series/Bering Sea Gold/' does not exist - skipping scan.
07:40:27 T:139924497970944 WARNING: Process directory 'nfs://10.2.1.100/volume1/media-import/Series/Boardwalk Empire/' does not exist - skipping scan.
07:40:27 T:139924497970944 WARNING: Process directory 'nfs://10.2.1.100/volume1/media-import/Series/Burn Notice/' does not exist - skipping scan.

So the first line proves it sees the directory - and It just says it cannot find that in the movie DB (which is fine).

Then the next two lines say it cannot find those paths. They are definately available as I can go and play/browse them from within XBMC.

I am using a shared MySQL db and I have the userdata redirected to a common nfs share for all of my openelec clients.

Any idea why?
Reply
This could very well just be me misunderstanding things but...

I have XMBC 12.2 for Windows 7 (media stored locally). I have the library auto-update add- on installed and configured to update / clean every two hours.

The update works fine for the most part however the "Recent Movies" and "Recent TV Shows" page doesn't display all of my recent items. Sometimes I'll see only a few of the items that I recently copied over... and yet, when I check the main movie list page (the full list -- not recent items) I see everything I added... so I know the scraper is working and finding them.

What am I missing?

A forum member suggested checking Service.py file for 1channel and fix a spelling error but I'm reasonably certain that they're thinking of a different addon.

What information can I provide that would be helpful in troubleshooting this?
Reply
Sorry to say I'm not sure what is going on there. The log entries you are seeing are created by the xbmc scanner and not this addon. I would try and post your log entries on trac.xbmc.org and see if a developer can help you figure out what is happening.
Reply
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 32

Logout Mark Read Team Forum Stats Members Help
Library Auto Updater - Version 1.1.00