Closed Herrminator closed 8 years ago
Hello Herminator
via Requires-Attribut a addon is only able to "reference" another Kodi-Addon. I'am not able to tell the System "please do a apt-get install lib[....]lxml" (for good reasons ;))
On the other hand without the Python-Lib lxml the KiKA part runs useless at all. The ongoing Site-Changes makes it very hard to parse the side only via "Regular Expression" (or in other words extreme ineffective). my last attemp was able to render the main page within 5 minutes.
So i had to make a choice. Drop KiKa Support or switch to xml/xpath based approach.
Because of all my Kodi Setups are based on ubuntu and i'am unaware of LibreELEC or the underlying JeOS i'am unable to give you the correct command how to install lib_lxml.
if pip is available the following should help
pip install lxml
if there is apt-get
sudo apt-get install python3-lxml
LibreELEC / OpenELEC is more or less a read-only OS. Installing additional components other than Kodi add-ons is generally not supported.
But i just tried Mediathek in a standard Windows installation of Kodi and i'm getting the same error. Kodi for Windows has its own Python interpreter, which also doesn't allow installation of additional modules (and I guess it would be too much to ask for a regular user).
I would guess the same is true for Kodi for Android and most of the Kodi-based appliances out there.
P.S.: How about using xml.etree? I know it's not as powerful as lxml, but it's included in Python since 2.7...
will look into this, or at least a check, that Kika isn.t supportet if lxml isnt found ...
xml.etree
doesn't really play well with pure HTML (not XHTML) input :-(
But another powerful HTML-Parser would be Beautiful Soup 4, which is available as a Kodi add-on (<import addon="script.module.beautifulsoup4" version="4.3.1"/>
).
It doesn't support XPATH searches, but it allows for complex search arguments and CSS-selectors.
CSS Selectors is yust fine ... will take a look into this. as long simply uncomment the importing of kika.py...
Same issue here with OSMC (4.4.13-5-osmc). As I don't watch kika, I opted for commenting the lines instead of installing python3-lxml.
Same issue on windows though (0.7.1 is fine):
`22:59:08 T:3228 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
fix released -> pushing it to kodi
New version pulled by kodi.
sorry for the inconvenience and thanks for the hints.
Since version 0.7.2, Mediathek throws an error on startup in LibreELEC (and possibly OpenELEC) installations, because LibreELEC doesn't ship with the
lxml
library and there are no dependencies defined inaddon.xml
:Log file: