Infolabel change
#1
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
Reply
#2
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.
Reply
#3
This has a fix in master now.

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

Let me know how it goes.
Reply
#4
Thanks Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


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

Thanks a lot!

Martin
Reply
#6
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
Reply
#7
The problem is now is InfoLabel don't like the python decimal type

Martin
Reply
#8
(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.
Reply
#9
Does this include the commit above? That should have resolved it.
Reply
#10
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)>
Reply
#11
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
Reply
#12
The commit works for my original None issue be no decimals in the YouTube plugin

Edit nevermind I see you can duplicate it.

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

Empty cast.

Image

Image

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

https://github.com/xbmc/xbmc/commit/119f...36216336e7
Reply

Logout Mark Read Team Forum Stats Members Help
Infolabel change0