Kodi Community Forum

Full Version: Infolabel change
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
As a heads-up recently my python addon stopped playback on some videos on this error

20:17:28 T:4728 ERROR: EXCEPTION: Failed to convert to input type to either a std:Confusedtring or a std::vector<(XBMCAddon::xbmcgui::InfoLabelStringOrTuple)>

and I narrowed it down to a None being passed as part of an Infolabel

{'Studio': None, 'Title': u'foobar'}

Setting Studio to '' fixes it so None types likely aren't allowed.

Martin
Thanks. This is due to a recent change I made to fix some other things. I'll fix this today.

Thanks jm for getting my attention.
This has a fix in master now.

See this commit: https://github.com/xbmc/xbmc/commit/36f3...88569c572b

Let me know how it goes.
Thanks Smile
Great, I got the nightly, put the code back to {'Studio': None, 'Title': u'foobar'} and it works.

Thanks a lot!

Martin
I just noticed though that it might be more than the None issue. I tried the YouTube pluging this morning and got a similar error to mine

Code:
11:37:38 T:8124   ERROR: EXCEPTION: Failed to convert to input type to either a std::string or a std::vector<(XBMCAddon::xbmcgui::InfoLabelStringOrTuple)>
11:37:38 T:8124   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: Failed to convert to input type to either a std::string or a std::vector<(XBMCAddon::xbmcgui::InfoLabelStringOrTuple)>
                                            Traceback (most recent call last):
                                              File "C:\Users\Martin\AppData\Roaming\XBMC\addons\plugin.video.youtube\default.py", line 122, in <module>
                                                navigation.listMenu(params)
                                              File "C:\Users\Martin\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubeNavigation.py", line 108, in listMenu
                                                return self.list(params)
                                              File "C:\Users\Martin\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubeNavigation.py", line 192, in list
                                                self.parseVideoList(params, results)
                                              File "C:\Users\Martin\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubeNavigation.py", line 487, in parseVideoList
                                                self.addVideoListItem(params, result_params, listSize)
                                              File "C:\Users\Martin\AppData\Roaming\XBMC\addons\plugin.video.youtube\YouTubeNavigation.py", line 445, in addVideoListItem
                                                listitem.setInfo(type='Video', infoLabels=item_params)
                                            TypeError: Failed to convert to input type to either a std::string or a std::vector<(XBMCAddon::xbmcgui::InfoLabelStringOrTuple)>
                                            -->End of Python script error report<--

I rolled back prior to the change and the YouTube plugin works.

Martin
The problem is now is InfoLabel don't like the python decimal type

Martin
(2013-12-30, 21:09)emveepee Wrote: [ -> ]The problem is now is InfoLabel don't like the python decimal type

Martin
Confirm this. If used str or unicode instead decimals all is fine.
Does this include the commit above? That should have resolved it.
Removed the rating infolabel and works. Decimal problem maybe.

But I can't get cast/castandrole listitem to work. I've tried many ways, list,dictionary.. 20131229

Quote:TypeError: Failed to convert to input type to either a std:Confusedtring or a std::vector<(XBMCAddon::xbmcgui::InfoLabelStringOrTuple)>
I reproduced the problem with the YouTube plugin. Thanks, I'll fix it.

@fightnight, this now works for the Apple Movie Trailer plugin which calls setInfo using 'cast'. Can you post a test case that reproduces the problem? If so I'm sure I can fix it or at least let you know what the problem is.

Thanks
Jim
The commit works for my original None issue be no decimals in the YouTube plugin

Edit nevermind I see you can duplicate it.

Martin
Just tested "Apple iTunes Trailers". It has cast but on plot.

Empty cast.

Image

Image

Code:
http://xbmclogs.com/show.php?id=103721
They made a 3rd one? :-)
YouTube's ability to take a number with a decimal point is fixed here:

https://github.com/xbmc/xbmc/commit/119f...36216336e7
Pages: 1 2