Kodi Community Forum
Infolabel change - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: Infolabel change (/showthread.php?tid=181453)

Pages: 1 2


Infolabel change - emveepee - 2013-12-28

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


RE: Infolabel change - jfcarroll - 2013-12-29

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.


RE: Infolabel change - jfcarroll - 2013-12-29

This has a fix in master now.

See this commit: https://github.com/xbmc/xbmc/commit/36f3eab206de2362d54c40c00cd4a888569c572b

Let me know how it goes.


RE: Infolabel change - jmarshall - 2013-12-30

Thanks Smile


RE: Infolabel change - emveepee - 2013-12-30

Great, I got the nightly, put the code back to {'Studio': None, 'Title': u'foobar'} and it works.

Thanks a lot!

Martin


RE: Infolabel change - emveepee - 2013-12-30

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


RE: Infolabel change - emveepee - 2013-12-30

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

Martin


RE: Infolabel change - afedchin - 2013-12-30

(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.


RE: Infolabel change - jfcarroll - 2013-12-30

Does this include the commit above? That should have resolved it.


RE: Infolabel change - fightnight - 2013-12-30

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)>



RE: Infolabel change - jfcarroll - 2013-12-30

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


RE: Infolabel change - emveepee - 2013-12-30

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

Edit nevermind I see you can duplicate it.

Martin


RE: Infolabel change - fightnight - 2013-12-30

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

Empty cast.

Image

Image

Code:
http://xbmclogs.com/show.php?id=103721



RE: Infolabel change - jfcarroll - 2013-12-30

They made a 3rd one? :-)


RE: Infolabel change - jfcarroll - 2013-12-31

YouTube's ability to take a number with a decimal point is fixed here:

https://github.com/xbmc/xbmc/commit/119f6f629cad90c63b640a79f3554f36216336e7