(2015-01-19, 12:53)starkiller Wrote: Hi,
First of all #S7eele thank you for keeping us all informed, and special tanks to Razze for all his efforts in trying to get the addon working again!
I am new to this forum and have no real experiance in python programming, so excuse me if this is a stupid sugestion.
But i noticed an error in the last versions of Razze (the ones from this week), at the bottom I enclosed the error message.
I don't know if you are already aware of this.
It looks like it's a TypeError in the sync.py file on line 213.
Again i don't know much about python, but i think it's in the [p] on that line.
I'm not sure how to fix it, but maybe someone could have a look at it.
Sorry if you guys are already aware of this.
Thanks again for all the good work, keep it up!
ERROR: Exception in thread trakt-sync:
Traceback (most recent call last):
File "C:\Program Files (x86)\XBMC\system\python\Lib\threading.py", line 808, in __bootstrap_inner
self.run()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\service.py", line 310, in run
sync.sync()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 707, in sync
self.syncEpisodes()
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 392, in syncEpisodes
traktShowsAdd = self.compareShows(xbmcShows, traktShows)
File "C:\Program Files (x86)\XBMC\addons\script.trakt\sync.py", line 213, in compareShows
a = show_col1[p][season]
TypeError: list indices must be integers, not dict
I have been looking into this error some more, it looks like the problem is in the format of the show-data of kodi (show_col1), specifically in the season format.
I have managed to take a look at how the show_col1 looks like just before the error occurs, and have enclosed that here:
NOTICE: [trakt] show_col1 {'seasons': [{'episodes': [{'ids': {'tvdb': u'4936768'}, 'number': 2, 'collected_at': '2015-01-19T19:45:35.610000'}], 'number': 3}, {'episodes': [{'ids': {'tvdb': u'4936769'}, 'number': 3, 'collected_at': '2015-01-19T19:45:35.610000'}], 'number': 3}, .....and so on......, 'year': 2012, 'ids': {'tvdb': u'257655'}, 'title': u'Arrow'}
It looks like the seasons aren't properly defined, the seasons are showing a list of episodes without the proper specification of what season it actualy is.
This data (show_col1) is specified in the sync.py file at line 112 till 153.
Especially line 130 is intresting: this line returnes all the information from Kodi in the following format:
NOTICE: [trakt] data: {u'episodes': [{u'episode': 2, u'uniqueid': {u'unknown': u'4936768'}, u'season': 3, u'episodeid': 2402, u'label': u'3x02. Sara', u'file': u'*****', u'playcount': 1}, .... etc....
In line 141 The data that is collected at line 130 is reformatted and stripped to the form that is later used in show_col1, this looks like this:
NOTICE: [trakt] episodes: [{'episodes': [{'ids': {'tvdb': u'4936768'}, 'number': 2, 'collected_at': '2015-01-19T21:01:15.152000'}], 'number': 3}, .....etc....
First of all i find it odd that both the episode number and the season number are named number in this format.
Second it's strange that the playcount from the data of line 141 isn't used in this new format.
I think the real problem is in line 143 witch states that the seasons just equel the eppisodes and this seems odd to me.
I hope someone can make sense of all this mess, i tryed my best but i can't figure out what's ectualy going wrong here.
Maybey someone more fimilliar with this addon code and more python skills can fix this.
I am not sure if this is the correct place to discuss the code itself but i don't know were i schould post this otherwise.
Sorry if this forum isn't ment for stuff like this.