Help: weird error... (an integer is required)
#1
I'm sorry for the bad title, but I really don't know what to say about it.

The thing is, the error happens when while I am iterating to display the items in the virtual directory. The thing is: The first time, it does not throw an error.
Now, the error happens when I do a simple "print", that will raise the above exception.

This is the line that triggers the error: All it does is print
http://github.com/alshain/xbmc-sftv/blob...all.py#L40
Code:
01:12:26 T:6332 M:743174144  NOTICE: plugin.video.sf.tv:: [VideoWall] Processing segment.
01:12:26 T:6332 M:743174144  NOTICE: Error:
01:12:26 T:6332 M:743174144  NOTICE: an integer is required
01:12:26 T:6332 M:743174144  NOTICE: Type:
01:12:26 T:6332 M:743174144  NOTICE: exceptions.TypeError
01:12:26 T:6332 M:743174144  NOTICE: Value
01:12:26 T:6332 M:743174144  NOTICE: an integer is required
01:12:26 T:6332 M:743174144  NOTICE: Stack:
01:12:26 T:6332 M:743100416  NOTICE:   File "E:\Programs\XBMC\portable_data\addons\plugin.video.sf.tv\addon.py", line 18, in ?
01:12:26 T:6332 M:743100416  NOTICE:     sftv.Main()
01:12:26 T:6332 M:743100416  NOTICE:   File "E:\Programs\XBMC\portable_data\addons\plugin.video.sf.tv\resources\lib\sftv.py", line 19, in __init__
01:12:26 T:6332 M:743100416  NOTICE:     mapping[first]()
01:12:26 T:6332 M:743067648  NOTICE:   File "E:\Programs\XBMC\portable_data\addons\plugin.video.sf.tv\resources\lib\sftv.py", line 28, in wall
01:12:26 T:6332 M:743067648  NOTICE:     wall.VideoWall()
01:12:26 T:6332 M:743067648  NOTICE:   File "E:\Programs\XBMC\portable_data\addons\plugin.video.sf.tv\resources\lib\wall.py", line 34, in __init__
01:12:26 T:6332 M:743067648  NOTICE:     print 'Stack:', traceback.print_stack()
01:12:26 T:6332 M:743067648  NOTICE: None
01:12:26 T:6332 M:743067648  NOTICE: Traceback:
01:12:26 T:6332 M:743067648  NOTICE:   File "E:\Programs\XBMC\portable_data\addons\plugin.video.sf.tv\resources\lib\wall.py", line 27, in __init__
01:12:26 T:6332 M:743067648  NOTICE:     id, info = self.parseSegment(segment)
01:12:26 T:6332 M:743067648  NOTICE:   File "E:\Programs\XBMC\portable_data\addons\plugin.video.sf.tv\resources\lib\wall.py", line 43, in parseSegment
01:12:26 T:6332 M:743067648  NOTICE:     self._log('Processing segment.')
01:12:26 T:6332 M:743067648  NOTICE:   File "E:\Programs\XBMC\portable_data\addons\plugin.video.sf.tv\resources\lib\util.py", line 74, in _log
01:12:26 T:6332 M:743063552  NOTICE:     self._plugin.log(msg, self.__class__.__name__)
01:12:26 T:6332 M:743063552  NOTICE:   File "E:\Programs\XBMC\portable_data\addons\plugin.video.sf.tv\resources\lib\plugin.py", line 34, in log
01:12:26 T:6332 M:743026688  NOTICE:     print '%s:: [%s] %s' % (self.name, module, msg)
01:12:26 T:6332 M:743026688  NOTICE: None

If I remove that, and all other print stuff, the error is being raised here:
http://github.com/alshain/xbmc-sftv/blob...dia.py#L31

Now the weird part:
In the server.py, I can mock the remote server, from which I get JSON and XML data. Instead, I just use data from requests that I have stored to files.
When using this mocked server, everything works flawlessly, but the error never occured in the "server-code". It used to work flawlessly with the live server as well, until they changed the XML. I cannot see any structural difference between the cached XML and the live XML.
http://www.videoportal.sf.tv/videowallajax

I have been staring at this damned code for the last three hours :S
Any ideas?
Reply
#2
so.... after restarting the PC, neither of them works anymore. Gotta love reproducibility Big Grin
Reply
#3
I seem to have solved the problem:
I have passed a dictionary to LiteItem.setInfo that contained unsupported value pairs. I assumed it would just ignore those that it did not know.

To track the error down, I used a decorator that printed "entering methodname" and "leaving methodname". It would throw an Exception when the method (or one of it's called functions) that "caused" the error was left.
Reply
#4
A simple script to reproduce the issue might be useful. Through it up on trac and cc me.

Cheers,
Jonathan
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
hmm ok. Will do it this evening if I can "get it back".
AFAIK it just happens, when you submit invalid key/value pairs to ListItemInstance.setInfo()
I now filter the dict before passing it to the function and it's gone.
Reply

Logout Mark Read Team Forum Stats Members Help
Help: weird error... (an integer is required)0