Your message dated Sun, 14 Sep 2025 02:31:02 -0300
with message-id <[email protected]>
and subject line python3-hpilo code crashes when handling an XML response
has caused the Debian Bug report #1005937,
regarding python3-hpilo code crashes when handling an XML response
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1005937: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005937
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python3-hpilo
Version: 4.3-3
Hi python3-hpilo maintainer,
The problem we ran into is that all actions fail where the xml returning from
the hpilo script must be converted to a dictionary. Actions where the xml
doesn't have to be converted work just fine.
Below is an example of when the script is working just fine.
ilo.get_host_power_status()
'ON'
Below is an example of the script running into the issue
ilo.get_host_data()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/hpilo.py", line 1193, in get_host_data
return self._info_tag('SERVER_INFO', 'GET_HOST_DATA', process=process)
File "/usr/lib/python3/dist-packages/hpilo.py", line 733, in _info_tag
return self._process_info_tag(message, returntags or [tagname], process)
File "/usr/lib/python3/dist-packages/hpilo.py", line 744, in _process_info_tag
return process(self._element_children_to_dict(message))
File "/usr/lib/python3/dist-packages/hpilo.py", line 645, in
_element_children_to_dict
val = self._element_to_dict(elt)
File "/usr/lib/python3/dist-packages/hpilo.py", line 678, in _element_to_dict
for child in element.getchildren():
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute
'getchildren'
The issue occurred after upgrading my laptop from buster to bullseye.
The reason why the problem occurs is that the getchildren function was removed
in python3.9 (https://docs.python.org/3.9/whatsnew/3.9.html#removed)
What’s New In Python 3.9 — Python 3.9.9
documentation<https://docs.python.org/3.9/whatsnew/3.9.html#removed>
New Parser¶. Python 3.9 uses a new parser, based on PEG instead of LL(1).The
new parser’s performance is roughly comparable to that of the old parser, but
the PEG formalism is more flexible than LL(1) when it comes to designing new
language features.
docs.python.org
See:
'Methods getchildren() and getiterator() of classes ElementTree and Element in
the ElementTree module have been removed. They were deprecated in Python 3.2.
Use iter(x) or list(x) instead of x.getchildren() and x.iter() or
list(x.iter()) instead of x.getiterator(). (Contributed by Serhiy Storchaka in
bpo-36543.)'
I can't find a Debian bug report yet, but the problem has been fixed in
python3-hpilo. See
https://github.com/seveas/python-hpilo/commit/86fbe9927685d7a7f69d9a86efaa01305607b2d8
[https://opengraph.githubassets.com/3baa4f8ef9b6c9201884a02fd115e7c994101c623a98a28fe94c4a5966663db9/seveas/python-hpilo/commit/86fbe9927685d7a7f69d9a86efaa01305607b2d8]<https://github.com/seveas/python-hpilo/commit/86fbe9927685d7a7f69d9a86efaa01305607b2d8>
Fix error with python 3.9 ·
seveas/python-hpilo@86fbe99<https://github.com/seveas/python-hpilo/commit/86fbe9927685d7a7f69d9a86efaa01305607b2d8>
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute
'getchildren' getchildren() has been removed in python 3.9
Signed-off-by: Etienne Champetier <echampetier...
github.com
Would applying this small targeted fix to unbreak a signification part of the
functionality of this library be eligible for a python3-hpilo package update in
the next stable point release?
Thank you,
Bart van der Meijden
--- End Message ---
--- Begin Message ---
Hi,
This bug should have been closed a while ago. The new upstream
release
already fixes it.
Please, feel free to re-open if the bug still happen.
--
cheers,
Emmanuel Arias
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ [email protected]
⢿⡄⠘⠷⠚⠋⠀ OpenPGP: 13796755BBC72BB8ABE2AEB5 FA9DEC5DE11C63F1
⠈⠳⣄
signature.asc
Description: PGP signature
--- End Message ---