salphonso 4 Posted October 2, 2014 Share Posted October 2, 2014 I all of a sudden started getting this error last night. Not sure what changed but it is having trouble concatenating str(id) only on a few folders. Below is the error and under that is a list of the folders with their IDs. It only happens to Recorded TV and Kid's TV Shows. I am unable to browser or play anything from those folders in XBMC/XBMB3C. It plays fine through Mediabrowser Web client and Roku app. 07:51:59 T:139806342412032 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: cannot concatenate 'str' and 'NoneType' objects Traceback (most recent call last): File "/home/scott/.xbmc/addons/plugin.video.xbmb3c/default.py", line 2882, in <module> PLAY(param_url, pluginhandle) File "/home/scott/.xbmc/addons/plugin.video.xbmb3c/default.py", line 911, in PLAY setListItemProps(server, id, listItem, result) File "/home/scott/.xbmc/addons/plugin.video.xbmb3c/default.py", line 1054, in setListItemProps setArt(listItem,'clearart', downloadUtils.getArtwork(result, "Art")) File "/home/scott/.xbmc/addons/plugin.video.xbmb3c/resources/lib/DownloadUtils.py", line 313, in getArtwork artwork = "http://" + server + "/mediabrowser/Items/" + str(id) + "/Images/" + type + "/" + index + "/" + imageTag + "/original/" + height + "/" + width + "/" + played + "?" + query TypeError: cannot concatenate 'str' and 'NoneType' objects -->End of Python script error report<-- Kids Movies 2b7b286df00e7997d2876a08f3629e71 false Full true Folder false FileSystem TV Shows 265a00743f960f7570b19faf02b7be54 false Full true Folder false FileSystem Music 8d32448233ea2c9d789b75390be300ee false Full true Folder false FileSystem Movies 74c102a0cf284dba84ea3bce64bc1762 false Full true Folder false FileSystem Kid's TV Shows aa36a3af55f3dbca5aa2891fe9a3faf0 false Full true Folder false FileSystem I was trying to figure out the actual value being passed for str(id) but I am not too familiar with debugging python. I am a C#,ASP.NET programmer. I need to find some time to get my hands dirty in Python. Any help is much appreciated. Link to comment Share on other sites More sharing options...
xnappo 1593 Posted October 2, 2014 Share Posted October 2, 2014 Please try rolling back a version: http://xbmc.org/xbmc-addon-rollbacks/ Unfortunately we are still recovering from massive changes pushed to the server over last weekend and have been trying to get to something stable since. After we get something stable - we promise to stop pushing to the main repo without a week of beta testing first. @@im85288 and @@boywhosetsfire - looks like missing error handling in getArtwork - since you are in timezones to look before I get a chance please do so. @@im85288 - what is the status of the repo? we need to lock down a version to seriously test and start using the beta repo. xnappo Link to comment Share on other sites More sharing options...
salphonso 4 Posted October 2, 2014 Author Share Posted October 2, 2014 I gave it a shot and tried to catch the exception on str(id) but getting those dang indentation errors. I need to setup an IDE for Python rather than trying to do it in notepad++ About to head out of town for the weekend. Maybe I'll give it another go when I get back Monday. Link to comment Share on other sites More sharing options...
xnappo 1593 Posted October 2, 2014 Share Posted October 2, 2014 Tabs vs spaces probably. . Link to comment Share on other sites More sharing options...
boywhosetsfire 12 Posted October 2, 2014 Share Posted October 2, 2014 I'm looking into it, but so far I don't really understand that bug... But I fully agree that we should stop putting new versions into the main repo with changes that are no bugfixes, it's just too risky. Link to comment Share on other sites More sharing options...
xnappo 1593 Posted October 2, 2014 Share Posted October 2, 2014 Not sure if this is it, but this looks bad because it doesn't check if parentImageTag is not None before assignment: if(data.get("ImageTags") != None and data.get("ImageTags").get(type) != None): imageTag = data.get("ImageTags").get(type) if (data.get("Type") == "Episode" or data.get("Type") == "Season") and type=="Logo": imageTag = data.get("ParentLogoImageTag") if (data.get("Type") == "Episode" or data.get("Type") == "Season") and type=="Art": imageTag = data.get("ParentArtImageTag") Link to comment Share on other sites More sharing options...
xnappo 1593 Posted October 2, 2014 Share Posted October 2, 2014 Yep - that was just changed last night, so I am guessing that is it. Link to comment Share on other sites More sharing options...
salphonso 4 Posted October 2, 2014 Author Share Posted October 2, 2014 If you want me to change anything and test I am here for about 30-40 more min. Also, I can only seem to get the error with clear art. If I add a clear art image the error still occurs. Not sure if that helps any. Link to comment Share on other sites More sharing options...
xnappo 1593 Posted October 2, 2014 Share Posted October 2, 2014 Try this change to the code above: if(data.get("ImageTags") != None and data.get("ImageTags").get(type) != None): imageTag = data.get("ImageTags").get(type) if (data.get("Type") == "Episode" or data.get("Type") == "Season") and type=="Logo": if data.get("ParentLogoImageTag") != None: imageTag = data.get("ParentLogoImageTag") if (data.get("Type") == "Episode" or data.get("Type") == "Season") and type=="Art": if data.get("ParentArtImageTag") != None: imageTag = data.get("ParentArtImageTag") Link to comment Share on other sites More sharing options...
boywhosetsfire 12 Posted October 2, 2014 Share Posted October 2, 2014 Thanks for the hint, Chris, I was looking into the wrong direction. That really was the problem, by deleting all artwork in one of my TV shows I was able to reproduce it. Just pushed a fix to Github, maybe you could review it. Link to comment Share on other sites More sharing options...
xnappo 1593 Posted October 2, 2014 Share Posted October 2, 2014 That should do the trick, but can't test for 6 hours xnappo Link to comment Share on other sites More sharing options...
boywhosetsfire 12 Posted October 2, 2014 Share Posted October 2, 2014 At least it did here Just have to fix Seinfeld in my database now Link to comment Share on other sites More sharing options...
salphonso 4 Posted October 2, 2014 Author Share Posted October 2, 2014 Just replaced it and that did the trick. Nice work! Link to comment Share on other sites More sharing options...
salphonso 4 Posted October 2, 2014 Author Share Posted October 2, 2014 I'm off to HHN in Orlando. Keep up the great work you all. Maybe one day I can think of something to contribute Link to comment Share on other sites More sharing options...
cncb 17 Posted October 2, 2014 Share Posted October 2, 2014 Is there any way to install an older version? Unfortunately, I just did a new install so the "Rollback" option is not available. Link to comment Share on other sites More sharing options...
xnappo 1593 Posted October 2, 2014 Share Posted October 2, 2014 No, unfortunately you need to make the fix above manually. You can just grab this file: https://github.com/MediaBrowser/MediaBrowser.XBMC/blob/master/resources/lib/DownloadUtils.py And replace it in the plugin resources/lib directory. I am hoping @@im85288 is going to fix the repo soon as I suck at it, but if he doesn't do so in the next couple of hours I will try to fix it. xnappo Link to comment Share on other sites More sharing options...
boywhosetsfire 12 Posted October 2, 2014 Share Posted October 2, 2014 Would be great if you could do it, null_pointer. I just increased the version number and also wanted to push it to the repo. But I need to get some sleep and I'm sure I would mess up the file structure if I'd do it now. Link to comment Share on other sites More sharing options...
xnappo 1593 Posted October 2, 2014 Share Posted October 2, 2014 Thanks! I am almost home but better if you do it anyway. Link to comment Share on other sites More sharing options...
xnappo 1593 Posted October 2, 2014 Share Posted October 2, 2014 Thanks @. All - we are very sorry for this and will take steps to ensure it does not happen again. xnappo Link to comment Share on other sites More sharing options...
Recommended Posts