joggs 24 Posted October 30, 2015 Posted October 30, 2015 Hi, I'm getting a python error in the kodi plugin. Looks like it cannot handle my special character ö, in the script path? 16:22:57 T:7708 NOTICE: EMBY Service -> ======== START EMBY ======== 16:22:57 T:7708 NOTICE: EMBY Service -> Platform: Windows 16:22:57 T:7708 NOTICE: EMBY Service -> KODI Version: 15.2 Git:20151019-02e7013 16:22:57 T:7708 NOTICE: EMBY Service -> EMBY Version: 1.1.39 16:22:57 T:7708 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.UnicodeEncodeError'> Error Contents: 'ascii' codec can't encode character u'\xf6' in position 23: ordinal not in range(128) Traceback (most recent call last): File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\service.py", line 270, in <module> Service().ServiceEntryPoint() File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\service.py", line 208, in ServiceEntryPoint elif user.getPublicUsers() == False: File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\UserClient.py", line 195, in getPublicUsers result = self.doUtils.downloadUrl(url, authenticate=False) File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\DownloadUtils.py", line 255, in downloadUrl header = self.getHeader(authenticate=False) File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\DownloadUtils.py", line 168, in getHeader deviceId = clientInfo.getMachineId() File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\ClientInformation.py", line 86, in getMachineId lock.release() File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\Lock.py", line 36, in release xbmc.log("File_Lock_On " + self.filename + " released") UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 23: ordinal not in range(128) -->End of Python script error report<-- 16:22:57 T:7708 WARNING: CPythonInvoker(1, C:\Users\Jörgen\AppData\Roaming\Kodi\addons\plugin.video.emby\service.py): the python script "C:\Users\Jörgen\AppData\Roaming\Kodi\addons\plugin.video.emby\service.py" has left several classes in memory that we couldn't clean up. The classes include: class XBMCAddon::xbmcgui::Window,class XBMCAddon::xbmcgui::Window,class XBMCAddon::xbmcgui::Window,class XBMCAddon::xbmcgui::Window,class PythonBindings::XBMCAddon_xbmc_Monitor_Director,class PythonBindings::XBMCAddon_xbmc_Monitor_Director,class PythonBindings::XBMCAddon_xbmc_Monitor_Director,class XBMCAddon::xbmcaddon::Addon,class XBMCAddon::xbmcaddon::Addon,class XBMCAddon::xbmcaddon::Addon,class XBMCAddon::xbmcaddon::Addon,class XBMCAddon::xbmcaddon::Addon,class XBMCAddon::xbmcaddon::Addon,class XBMCAddon::xbmcaddon::Addon,class XBMCAddon::xbmc::Player
joggs 24 Posted October 30, 2015 Author Posted October 30, 2015 (edited) Full kodi log: Edit: Removed full log from post. Edited October 31, 2015 by Angelblue05
joggs 24 Posted October 30, 2015 Author Posted October 30, 2015 (edited) If i comment the xbmc.log rows in lock.py the script runs. The next bug appears when I do a manual update where you find the next unicode bug. It creates a filepath with the wrong username, instead of "jörgen" it creates something not decoded/encoded properly: 17:59:16 T:12172 NOTICE: plugin.video.emby started 17:59:16 T:12172 NOTICE: Parameter string: ?mode=manualsync 17:59:16 T:12172 NOTICE: [Error 183] Cannot create a file when that file already exists: 'C:\\Users\\J\xc3\xb6rgen\\AppData\\Roaming\\Kodi\\userdata\\library\\video' 17:59:16 T:12172 NOTICE: EMBY DownloadUtils -> Unknown error connecting to: /mediabrowser/Users//Items?Sortby=SortName&format=json 17:59:16 T:12172 NOTICE: EMBY DownloadUtils -> Unknown error connecting to: /mediabrowser/Users//Items?SortBy=SortName&IsVirtualUnaired=false&IsMissing=False&Fields=Name,SortName,CumulativeRunTimeTicks,Etag&Recursive=true&SortOrder=Ascending&IncludeItemTypes=BoxSet&format=json&ImageTypeLimit=1 17:59:16 T:12172 NOTICE: EMBY DownloadUtils -> Unknown error connecting to: /mediabrowser/Users//Items?Sortby=SortName&format=json 17:59:16 T:12172 NOTICE: EMBY DownloadUtils -> Unknown error connecting to: /mediabrowser/Users//items?&SortBy=SortName&Fields=CumulativeRunTimeTicks,Etag&Recursive=true&SortOrder=Descending&IncludeItemTypes=MusicVideo&CollapseBoxSetItems=false&ImageTypeLimit=1&format=json 17:59:17 T:12172 NOTICE: EMBY DownloadUtils -> Unknown error connecting to: /Artists?Limit=1&Recursive=true&Fields=Etag,Path,Genres,SortName,Studios,Writer,ProductionYear,Taglines,CommunityRating,OfficialRating,CumulativeRunTimeTicks,Metascore,AirTime,DateCreated,MediaStreams,People,Overview&UserId=&format=json 17:59:17 T:12172 NOTICE: Sync DB -> syncDatabase Exiting 17:59:17 T:12172 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.TypeError'> Error Contents: string indices must be integers, not str Traceback (most recent call last): File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\default.py", line 126, in <module> Main() File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\default.py", line 67, in __init__ LibrarySync().FullLibrarySync(True) File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\LibrarySync.py", line 177, in FullLibrarySync self.MusicFullSync(connection,cursor,pDialog) File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\LibrarySync.py", line 480, in MusicFullSync self.ProcessMusicArtists(connection,cursor,pDialog) File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\LibrarySync.py", line 540, in ProcessMusicArtists allEmbyArtists = ReadEmbyDB().getMusicArtistsTotal() File "C:\Users\Jn\AppData\Roaming\Kodi\addons\plugin.video.emby\resources\lib\ReadEmbyDB.py", line 88, in getMusicArtistsTotal total = jsondata['TotalRecordCount'] TypeError: string indices must be integers, not str -->End of Python script error report<-- 17:59:17 T:12172 WARNING: CPythonInvoker(3, C:\Users\Jörgen\AppData\Roaming\Kodi\addons\plugin.video.emby\default.py): the python script "C:\Users\Jörgen\AppData\Roaming\Kodi\addons\plugin.video.emby\default.py" has left several classes in memory that we couldn't clean up. The classes include: class PythonBindings::XBMCAddon_xbmc_Monitor_Director,class XBMCAddon::xbmcgui::Window,class XBMCAddon::xbmcaddon::Addon Edited October 31, 2015 by Angelblue05
joggs 24 Posted October 30, 2015 Author Posted October 30, 2015 Ok, the tv and movie parts seem to work. when i disabled music library from within the kodi plugin, it starts syncing movies and tv shows.
Angelblue05 4132 Posted October 31, 2015 Posted October 31, 2015 (edited) Please do not post your logs directly into the post, you can easily attach the log file to your post or using pastebin or dropbox. The first unicode error is currently fixed in the beta version of the add-on. I will look into the other one, I have noticed a few that I have fixed since stable was released. You may have a better experience using beta. However your second post: Looks to be your server might have frozen (unable to reach your server when we queried your music artists). Restart your server/device and try again. Let me know. Edited October 31, 2015 by Angelblue05
Recommended Posts