[mythtv] Lots of our python scripts are failing because of a broken version check on lxml
Paul Harrison
mythtv at mythqml.net
Tue Apr 1 21:51:01 UTC 2025
On 01/04/2025 20:12, Roland Ernst wrote:
>
> On Tue, 1 Apr 2025 at 19:38, Paul Harrison <mythtv at mythqml.net> wrote:
>
> The error is :-
>
> ! Error - The installed version of the "lxml" python library
> "libxml" version is too old.
> At least "libxml" version 2.7.2 must be installed.
> Your version is (2.12.7).
>
> The code in question looks like this example :-
>
> https://github.com/MythTV/mythtv/blob/3016c13fef7e24136144c8648f3f844bd165978d/mythtv/programs/scripts/internetcontent/nv_python_libs/bbciplayer/bbciplayer_api.py#L73
>
>
>
> My guess is these checks aren't really required these days so
> can be removed or they need fixing to work with versions
> numbers > 9?
>
>
> Thoughts?
>
>
> Paul H.
>
>
>
> Comparing tuples is much easier:
> $ python3
> Python 3.12.3 (main, Feb 4 2025, 14:48:35) [GCC 13.3.0] on linux
> >>> from lxml import etree
> >>> etree.LIBXML_VERSION
> (2, 9, 14)
> >>> type(etree.LIBXML_VERSION)
> <class 'tuple'>
> >>> etree.LIBXML_VERSION < (2, 7, 2)
> False
> >>>
> Roland
>
Yeah that would work. Is it likely that any current distro has libxml <
2.7.2 though? The comment in the code mentions testing with Ubuntu 9.10
which is ancient.
Paul H.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20250401/8d24c973/attachment.htm>
More information about the mythtv-dev
mailing list