30.4.2022, 13:32
Ahojte, v doplnku pre Matrix si importujem:
Ten ma ako zavislost script.module.beautifulsoup4.
Pri volani util.parse_html (script.module.stream.resolver) dostavam:
Problem je teda v tomto riadku (script.module.stream.resolver/lib/util.py):
Ak 'html5lib' odstranim, exception sa neraisne a doplnok funguje normalne. Viete prosim poradit, ako to vyriesit? Rad by som vsak i nadalej volal util.py a neimportoval bs4 priamo.
Vdaka, jose
Kód:
<import addon="script.module.stream.resolver" version="1.6.55" />
Ten ma ako zavislost script.module.beautifulsoup4.
Pri volani util.parse_html (script.module.stream.resolver) dostavam:
Kód:
2022-04-30 12:40:04.042 T:247 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'bs4.FeatureNotFound'>
Error Contents: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
Traceback (most recent call last):
File "/home/jose/.kodi/addons/plugin.video.mojevideo.sk/default.py", line 122, in <module>
MojevideoXBMCContentProvider(mojevideo.MojevideoContentProvider(tmp_dir=xbmc.translatePath(__addon__.getAddonInfo('profile'))), settings, __addon__).run(params)
File "/home/jose/.kodi/addons/script.module.stream.resolver/lib/contentprovider/xbmcprovider.py", line 83, in run
self.list(self.provider.list(params['list']))
File "/home/jose/.kodi/addons/plugin.video.mojevideo.sk/resources/lib/mojevideo.py", line 56, in list
return self.show_comments(self._url(url[10:]))
File "/home/jose/.kodi/addons/plugin.video.mojevideo.sk/resources/lib/mojevideo.py", line 87, in show_comments
data = util.parse_html(page)
File "/home/jose/.kodi/addons/script.module.stream.resolver/lib/util.py", line 357, in parse_html
return BeautifulSoup(request(url), 'html5lib', from_encoding='utf-8')
File "/home/jose/.kodi/addons/script.module.beautifulsoup4/lib/bs4/__init__.py", line 243, in __init__
raise FeatureNotFound(
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
-->End of Python script error report<--
Problem je teda v tomto riadku (script.module.stream.resolver/lib/util.py):
Kód:
return BeautifulSoup(request(url), 'html5lib', from_encoding='utf-8')
Ak 'html5lib' odstranim, exception sa neraisne a doplnok funguje normalne. Viete prosim poradit, ako to vyriesit? Rad by som vsak i nadalej volal util.py a neimportoval bs4 priamo.
Vdaka, jose