Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

TV-Shows are not working on Kodi 19/Python 3 #2

Closed
jarmo opened this issue Jan 12, 2020 · 3 comments
Closed

TV-Shows are not working on Kodi 19/Python 3 #2

jarmo opened this issue Jan 12, 2020 · 3 comments

Comments

@jarmo
Copy link
Owner

jarmo commented Jan 12, 2020

According to https://forum.kodi.tv/showthread.php?tid=184854&pid=2915699#pid2915699 there is a problem running this plugin on Kodi 19/Python 3. Here's the relevant stacktrace:

Error Type: <class 'NameError'>
Error Contents: name 'HTMLParser' is not defined
Traceback (most recent call last):
  File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.subscene/service.py", line 605, in <module>
    search(item)
  File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.subscene/service.py", line 385, in search
    search_tvshow(item['tvshow'], item['season'], item['episode'], item['3let_language'], filename)
  File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.subscene/service.py", line 345, in search_tvshow
    tv_show_seasonurl = find_tv_show_season(content, tvshow, seasons[int(season)])
  File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.subtitles.subscene/service.py", line 155, in find_tv_show_season
    h = HTMLParser.HTMLParser()
NameError: name 'HTMLParser' is not defined

Offending line is this: https://github.com/jarmo/service.subtitles.subscene/blob/master/service.py#L155

It seems that this logic should be similar to: https://github.com/jarmo/service.subtitles.subscene/blob/master/service.py#L89-L92

@jarmo
Copy link
Owner Author

jarmo commented Jan 12, 2020

Since find_tv_show_season is not tried out before then I would not just make these 3 lines change, but I would actually try this functionality out to be sure that everything else in that function works with Python 3.

PS! Extract these 3 lines into a html_parser method or something since it's going to be already at three different places.

@AnonTester
Copy link

I didn't test tvshows before and missed the parser call. As all are the same, I reverted the conditional call and loaded the html.parser as HTMLParser instead.

@jarmo
Copy link
Owner Author

jarmo commented Jan 12, 2020

Fixed in 1.8.2.

@jarmo jarmo closed this as completed Jan 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants