Jump to content

"Library sync thread has exited!"


SteveSng

Recommended Posts

SteveSng

I'm using Emby for Kodi on an Nvidia Shield TV box.  Media is stored on an Unraid NAS and Emby Server is on a Windows 7 machine.

 

Shield firmware is latest (2.1)

Kodi is 16.0-BETA5 Git: 2015-12-28-afb466 (experimental audio pass-through build)

Emby is latest beta 1.1.76

 

Log location: http://xbmclogs.com/pvaplr5cr

 

Everything was fine with previous beta 1.1.75 until I started receiving the error  two days ago.

 

I've reinstalled Kodi and Emby and on initial sync it gets past  thew "Gathering Songs" phase (takes an enormous amount of time ) and crashes immediately on "Processing Songs"  (there's a lot - 32,123)

 

I've read the threads below from the last few days and tried to implement the suggestions.  Nothing seems to work.  I love this product and want it to start working again. 

 

Thanks in advance for the assistance.

 

Steve

Link to comment
Share on other sites

galways

Getting a similar error that kicks me out of the Library sync.  Also on latest beta 1.1.76.

 

....UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 41: ordinal not in range(128)....

 

The song showing on screen, Haunted House, is in the library as :Jumpin’ Gene Simmons - Haunted House

Link to comment
Share on other sites

browned

Same.

 

848.                                            UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 114: ordinal not in range(128)

Link to comment
Share on other sites

marcelveldt

Getting a similar error that kicks me out of the Library sync.  Also on latest beta 1.1.76.

 

....UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 41: ordinal not in range(128)....

 

The song showing on screen, Haunted House, is in the library as :Jumpin’ Gene Simmons - Haunted House

 

I'll look into it.

  • Like 1
Link to comment
Share on other sites

marcelveldt

Thanks Marcel. Let me know if I can help :)

 

It should be fixed now altough I don't have an Android device to check if it's working.

Link to comment
Share on other sites

marcelveldt

@@SteveSng or @@browned

 

I have fixed some issues in the code for better support of android OS (including Nvidia shield)

Can one of you test with the latest Git version of the addon ?

 

https://github.com/MediaBrowser/plugin.video.emby/archive/master.zip

 

Just overwrite the contents of the zip in your kodi addons folder, do NOT install this zip in Kodi

 

If it's not possible to test with the git version, maybe @@Angelblue05 can put a new beta version on the repo ?

Link to comment
Share on other sites

marcelveldt

@@marcelveldt i tried the github version and still get the "Library sync thread has exited!"

attachicon.gifkodi.log

Did you reset your DB after aplying latest version ?

I will do a quick fix in the code that that won't be needed but for now it is.

 

EDIT: OK, also fixed on Git that a new initial sync is not required but if you want your music ratings to be scraped into Kodi, you'll still have to do otherwise only for new/modified files the rating will be scraped.

Edited by marcelveldt
  • Like 1
Link to comment
Share on other sites

Did you reset your DB after aplying latest version ?

I will do a quick fix in the code that that won't be needed but for now it is.

Yeah sorry forgot about the reset trying to fix no dialog boxes in Kodi, done a reset now and it's working fine. Cheers

  • Like 1
Link to comment
Share on other sites

marcelveldt

I tried the github version and still get the "Library sync thread has exited!" when resetting the DB

 

Oops, typo in the code.

Can you please check again with latest Git version ?

Link to comment
Share on other sites

@@marcelveldt did you change something again? git version is now causing this error

 

19:37:24 T:22020   ERROR: Exception in thread Thread-10:
                                            Traceback (most recent call last):
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\threading.py", line 810, in __bootstrap_inner
                                                self.run()
                                              File "C:\Users\KompLeX\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\librarysync.py", line 1118, in run
                                                self.run_internal()
                                              File "C:\Users\KompLeX\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\librarysync.py", line 1201, in run_internal
                                                librarySync = self.startSync()
                                              File "C:\Users\KompLeX\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\librarysync.py", line 97, in startSync
                                                completed = self.fullSync()
                                              File "C:\Users\KompLeX\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\librarysync.py", line 262, in fullSync
                                                completed = self.music(embycursor, musiccursor, pDialog, compare=manualrun)
                                              File "C:\Users\KompLeX\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\librarysync.py", line 972, in music
                                                process[type][1](embyitem)
                                              File "C:\Users\KompLeX\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\itemtypes.py", line 2163, in add_updateSong
                                                allart["Primary"] = "image://music@" + artwork.single_urlencode( playurl )
                                              File "C:\Users\KompLeX\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\artwork.py", line 58, in single_urlencode
                                                text = urllib.urlencode({'blahblahblah':text})
                                              File "C:\Program Files (x86)\Kodi\system\python\Lib\urllib.py", line 1332, in urlencode
                                                v = quote_plus(str(v))
                                            UnicodeEncodeError: 'ascii' codec can't encode character u'\xf1' in position 67: ordinal not in range(128)

 

Link to comment
Share on other sites

marcelveldt

 

@@marcelveldt did you change something again? git version is now causing this error

 

 

No, this is another error. Good news, because this means the original error is now resolved ;-)

Can you please check latest Git again ?

Edited by marcelveldt
  • Like 1
Link to comment
Share on other sites

No, this is another error. Good news, because this means the original error is now resolved ;-)

Can you please check latest Git again ?

Yeah that one fixed it :) don't go anywhere i have another problem i think the emby addon is causing lol i'll make a thread for it

Link to comment
Share on other sites

marcelveldt

Yeah that one fixed it :) don't go anywhere i have another problem i think the emby addon is causing lol i'll make a thread for it

 

haha, OK :-)

Link to comment
Share on other sites

galways

Oops, typo in the code.

Can you please check again with latest Git version ?

Stopped at Haunted House again, different error:

 

15:07:56 T:139921188689664  NOTICE: Emby musictools -> getting song ID3 tags for /storage/.kodi/temp/Jumpin’ Gene Simmons - Haunted House.mp3
15:07:56 T:139921188689664  NOTICE: Emby musictools -> Exception in getSongTags 'ascii' codec can't encode character u'\u2019' in position 26: ordinal not in range(128)
15:07:57 T:139921230628608  NOTICE: EMBY WebSocket_Client -> Message: {"MessageType":"UserDataChanged","Data":{"UserId":"a3b7d43551aa48fb9b67f93a178dae94","UserDataList":[{"Rating":1,"PlaybackPositionTicks":0,"PlayCount":0,"IsFavorite":false,"Likes":false,"Played":false,"Key":"7e7a252d-56ba-fd96-2801-89294a4190eb","ItemId":"7e7a252d56bafd96280189294a4190eb"},{"PlayedPercentage":66.6666666666667,"UnplayedItemCount":10,"PlaybackPositionTicks":0,"PlayCount":0,"IsFavorite":false,"Played":false,"Key":"MusicAlbum-MusicBrainzReleaseGroup-f0fff930-3281-3120-8bae-cce434da41f7","ItemId":"44c9b06270336ac984d08e4fb4671771"},{"Rating":1,"PlaybackPositionTicks":0,"PlayCount":0,"IsFavorite":false,"Likes":false,"Played":false,"Key":"dee8db17-d600-f1ce-0303-592437fac6d70000 - 0000 - ","ItemId":"d7af43765ebcf14cbef680493dc922ef"},{"PlayedPercentage":0,"UnplayedItemCount":501,"PlaybackPositionTicks":0,"PlayCount":0,"IsFavorite":false,"Played":false,"Key":"dee8db17-d600-f1ce-0303-592437fac6d7","ItemId":"dee8db17d600f1ce0303592437fac6d7"},{"Rating":1,"PlaybackPositionTicks":0,"PlayCount":0,"IsFavorite":false,"Likes":false,"Played":false,"Key":"MusicAlbum-MusicBrainzReleaseGroup-eb64013e-228f-3250-a6d5-e90b424415ee0000 - 0000 - ","ItemId":"f9d370e22ff4b6ac37a2ad540d6a6bba"},{"PlayedPercentage":0,"UnplayedItemCount":116,"PlaybackPositionTicks":0,"PlayCount":0,"IsFavorite":false,"Played":false,"Key":"MusicAlbum-MusicBrainzReleaseGroup-eb64013e-228f-3250-a6d5-e90b424415ee","ItemId":"e61293869a583d8a193a665c403e2fd1"},{"Rating":1,"PlaybackPositionTicks":0,"PlayCount":0,"IsFavorite":false,"Likes":false,"Played":false,"Key":"dee8db17-d600-f1ce-0303-592437fac6d70000 - 0000 - ","ItemId":"61f95939f55528e26b4cff450efde00a"},{"Rating":1,"PlaybackPositionTicks":0,"PlayCount":0,"IsFavorite":false,"Likes":false,"Played":false,"Key":"MusicAlbum-MusicBrainzReleaseGroup-eb64013e-228f-3250-a6d5-e90b424415ee0000 - 0000 - ","ItemId":"8f873015658e22c578c4c3604889192d"}]}}
15:07:57 T:139921230628608  NOTICE: EMBY LibrarySync -> Queue userdata: [u'7e7a252d56bafd96280189294a4190eb', u'44c9b06270336ac984d08e4fb4671771', u'd7af43765ebcf14cbef680493dc922ef', u'dee8db17d600f1ce0303592437fac6d7', u'f9d370e22ff4b6ac37a2ad540d6a6bba', u'e61293869a583d8a193a665c403e2fd1', u'61f95939f55528e26b4cff450efde00a', u'8f873015658e22c578c4c3604889192d']
15:08:11 T:139921188689664   ERROR: Exception in thread Thread-10:
                                            Traceback (most recent call last):
                                              File "/home/aeon/OpenELEC.tv/build.OpenELEC-unRAID.x86_64-5.95.3/Python-2.7.3/.install_pkg/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/librarysync.py", line 1118, in run
                                                self.run_internal()
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/librarysync.py", line 1201, in run_internal
                                                librarySync = self.startSync()
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/librarysync.py", line 97, in startSync
                                                completed = self.fullSync()
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/librarysync.py", line 262, in fullSync
                                                completed = self.music(embycursor, musiccursor, pDialog, compare=manualrun)
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/librarysync.py", line 972, in music
                                                process[type][1](embyitem)
                                              File "/storage/.kodi/addons/plugin.video.emby/resources/lib/itemtypes.py", line 1957, in add_updateSong
                                                rating, comment, hasEmbeddedCover = self.getSongTagsFromFile(itemid, rating, API)
                                            ValueError: need more than 2 values to unpack
15:08:22 T:139920496551680  NOTICE: Thread JobWorker start, auto delete: true
Link to comment
Share on other sites

marcelveldt

 

Stopped at Haunted House again, different error:

Thanks for testing again. Also fixed this error. Can you please check again with the latest Git version ?

 

Also, out of curiosity, what kind of file is it? Just a plain mp3 or flac file or is it in another file format ?

Link to comment
Share on other sites

galways

Thanks for testing again. Also fixed this error. Can you please check again with the latest Git version ?

 

Also, out of curiosity, what kind of file is it? Just a plain mp3 or flac file or is it in another file format ?

 

It got by the point it was failing at, the song was "Jumpin’ Gene Simmons - Haunted House.mp3"

 

It is still updating but very slowly (40 minutes to get through 4000 songs a thirds of my library).  From an older log it used to update with the following steps:

 

18:21:17 T:140175877318400  NOTICE: Emby musictools -> getting song ID3 tags for /storage/.kodi/temp/The Beatles - A Day in the Life.mp3

18:21:17 T:140175877318400  NOTICE: EMBY Music -> ADD song itemid: d7af43765ebcf14cbef680493dc922ef - Title: A Day in the Life
18:21:18 T:140175877318400  NOTICE: Emby musictools -> getting song ID3 tags for /storage/.kodi/temp/The Dave Clark Five - Can't You See That She's Mine.mp3
18:21:18 T:140175877318400  NOTICE: EMBY Music -> ADD song itemid: f9d370e22ff4b6ac37a2ad540d6a6bba - Title: Can't You See That She's Mine
18:21:18 T:140175877318400  NOTICE: Emby musictools -> getting song ID3 tags for /storage/.kodi/temp/Pink Floyd - Comfortably Numb.mp3
18:21:18 T:140175877318400  NOTICE: EMBY Music -> ADD song itemid: 61f95939f55528e26b4cff450efde00a - Title: Comfortably Numb
 
 
It is now doing this (may well be by design) and taking much longer:
 
15:35:46 T:139833573885696  NOTICE: Emby musictools -> getting song ID3 tags for /storage/.kodi/temp/The Beatles - A Day in the Life.mp3
15:35:46 T:139833573885696  NOTICE: EMBY Music -> getSongTagsFromFile --> embyid: d7af43765ebcf14cbef680493dc922ef - emby_rating: 0 - file_rating: 0 - current rating in kodidb: None
15:35:46 T:139833573885696  NOTICE: EMBY API -> updateUserRating on embyserver for embyId: d7af43765ebcf14cbef680493dc922ef - like: False - favourite: False - deletelike: False
15:35:46 T:139833573885696  NOTICE: EMBY Music -> ADD song itemid: d7af43765ebcf14cbef680493dc922ef - Title: A Day in the Life
15:35:46 T:139833573885696  NOTICE: Emby musictools -> getting song ID3 tags for /storage/.kodi/temp/The Dave Clark Five - Can't You See That She's Mine.mp3
15:35:46 T:139833573885696  NOTICE: EMBY Music -> getSongTagsFromFile --> embyid: f9d370e22ff4b6ac37a2ad540d6a6bba - emby_rating: 0 - file_rating: 0 - current rating in kodidb: None
15:35:46 T:139833573885696  NOTICE: EMBY API -> updateUserRating on embyserver for embyId: f9d370e22ff4b6ac37a2ad540d6a6bba - like: False - favourite: False - deletelike: False
15:35:46 T:139833573885696  NOTICE: EMBY Music -> ADD song itemid: f9d370e22ff4b6ac37a2ad540d6a6bba - Title: Can't You See That She's Mine
15:35:47 T:139833573885696  NOTICE: Emby musictools -> getting song ID3 tags for /storage/.kodi/temp/Pink Floyd - Comfortably Numb.mp3
15:35:47 T:139833573885696  NOTICE: EMBY Music -> getSongTagsFromFile --> embyid: 61f95939f55528e26b4cff450efde00a - emby_rating: 0 - file_rating: 0 - current rating in kodidb: None
15:35:47 T:139833573885696  NOTICE: EMBY API -> updateUserRating on embyserver for embyId: 61f95939f55528e26b4cff450efde00a - like: False - favourite: False - deletelike: False
15:35:47 T:139833573885696  NOTICE: EMBY Music -> ADD song itemid: 61f95939f55528e26b4cff450efde00a - Title: Comfortably Numb
Link to comment
Share on other sites

browned

My PC seems to be fixed, it wouldn't do a full resync with the same error as the two Shields. I will test the Shield's tonight after work if a new emby beta isn't released by then.

 

Thanks

  • Like 1
Link to comment
Share on other sites

marcelveldt

 

It got by the point it was failing at, the song was "Jumpin’ Gene Simmons - Haunted House.mp3"

 

It is still updating but very slowly (40 minutes to get through 4000 songs a thirds of my library).  From an older log it used to update with the following steps:

 
It is now doing this (may well be by design) and taking much longer:
 

 

OK, great, so the issue is finally resolved now.

 

We have added support for ID3 tags in the music files, especially for the rating, comment and embedded cover metadata because that info is not scraped by the Emby server (might be in the future, who knows). This means that the Kodi addon itself will now read every song to fetch the data resulting in a slower sync.

 

It was either that or the info still missing so we enabled it by default. Based on user feedback we can decide if it should be an optional setting, for example for user who do not have set any proper ID3 tags on their music files.

Link to comment
Share on other sites

marcelveldt

My PC seems to be fixed, it wouldn't do a full resync with the same error as the two Shields. I will test the Shield's tonight after work if a new emby beta isn't released by then.

 

Thanks

 

I can check if we can put a new beta up today because you guys confirmed the issue being resolved.

Link to comment
Share on other sites

galways

OK, great, so the issue is finally resolved now.

 

We have added support for ID3 tags in the music files, especially for the rating, comment and embedded cover metadata because that info is not scraped by the Emby server (might be in the future, who knows). This means that the Kodi addon itself will now read every song to fetch the data resulting in a slower sync.

 

It was either that or the info still missing so we enabled it by default. Based on user feedback we can decide if it should be an optional setting, for example for user who do not have set any proper ID3 tags on their music files.

 

My vote would be to make scraping the tag info optional as it looks like its going to be two and a half hours on my i7 processor, can just imagine how long its going to take to update a low end client like the Pivos box on my kids TVs.

 

In any event, thanks for the fix and support.

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...