pigskin / kodi-gamepass

NFL Game Pass add-on for Kodi
Other
123 stars 83 forks source link

Error loading games list when live games are on #433

Closed ohhmyy closed 2 years ago

ohhmyy commented 2 years ago

Hi guys. I'm running the matrix version on kodi 19. Everything works quite well so far, except when live games are on. When I want to display the list of games of the current preseason week 1, I get an error message when a live game is in progress:

ERROR <general>: [script.video.nfl.gamepass] script.video.nfl.gamepass: can't concat str to bytes
                 Traceback (most recent call last):
                   File "/storage/.kodi/addons/script.video.nfl.gamepass/default.py", line 555, in onClick
                     self.display_weeks_games()
                   File "/storage/.kodi/addons/script.video.nfl.gamepass/default.py", line 336, in display_weeks_games
                     game_info += '[CR]» Live «'
                 TypeError: can't concat str to bytes
ghost commented 2 years ago

Replace line 336 with:

game_info += ("[CR]» Live «").encode('utf-8')

ohhmyy commented 2 years ago

That worked. Thanks a lot.

ghost commented 2 years ago

The "Fix for display of NONE" is only working on past game listings. So I deleted my fix, because it is not working for future game listings

jm-duke commented 2 years ago

Yeah, caught another Python 2 -> Python 3 issue here ;-)

The issue is introduced a few lines up. In theory I have it fixed locally, but I still need to test this.