Bug#978657: unknown-horizons: Crash on startup with xml AttributeError "no attribute 'getchildren'"

2020-12-30 Thread Simon McVittie
Control: reassign -1 python3-fife 0.4.2-2
Control: affects -1 + unknown-horizons

On Tue, 29 Dec 2020 at 20:54:44 +0100, Steffen Langenbach wrote:
> I encountered a problem starting unknown-horizons.
...
>   File "/usr/lib/python3/dist-
> packages/fife/extensions/serializers/simplexml.py", line 386, in _validateTree
> for c in self._root_element.getchildren():
> AttributeError: 'xml.etree.ElementTree.Element' object has no attribute
> 'getchildren'

This looks like an incompatibility between fife and Python 3.9, similar to
. The getchildren method was removed
from xml.etree in the Python 3.9 standard library, and fife probably
needs to use "for c in self._root_element:" instead.

smcv



Bug#978657: unknown-horizons: Crash on startup with xml AttributeError "no attribute 'getchildren'"

2020-12-29 Thread Steffen Langenbach
Package: unknown-horizons
Version: 2019.1-2
Severity: grave
Tags: a11y
Justification: renders package unusable

Hi,

I encountered a problem starting unknown-horizons. I installed from standard
debian testing repository and get the following error:

---
$ unknown-horizons --debug
Logging to b'/home/sal/.local/share/unknown-horizons/log/unknown-
horizons-2020-12-29_20-40-06.log' and /usr/share/unknown-horizons/fife.log
Python version: sys.version_info(major=3, minor=9, micro=1,
releaselevel='final', serial=0)
Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.31
SYS.PATH: ['/usr/games', '/usr/lib/python39.zip', '/usr/lib/python3.9',
'/usr/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/dist-packages',
'/usr/lib/python3/dist-packages']
PATHSEP: ":" SEP: "/"
LD_LIBRARY_PATH: 
PATH:
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/var/lib/flatpak/exports/bin
PYTHONPATH 
Python version: sys.version_info(major=3, minor=9, micro=1,
releaselevel='final', serial=0)
Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.31
Using fife version 0.4.2, at least 0.4.2 required
Traceback (most recent call last):
  File "/usr/games/unknown-horizons", line 381, in 
main()
  File "/usr/games/unknown-horizons", line 122, in main
ret = horizons.main.start(options)
  File "/usr/lib/python3/dist-packages/horizons/main.py", line 113, in start
horizons.globals.fife = Fife()
  File "/usr/lib/python3/dist-packages/horizons/engine/engine.py", line 46, in
__init__
self._setting = Settings(PATHS.USER_CONFIG_FILE,
PATHS.SETTINGS_TEMPLATE_FILE)
  File "/usr/lib/python3/dist-packages/horizons/engine/settings.py", line 39,
in __init__
self._settings_serializer.load(settings_file)
  File "/usr/lib/python3/dist-
packages/fife/extensions/serializers/simplexml.py", line 132, in load
self._validateTree()
  File "/usr/lib/python3/dist-
packages/fife/extensions/serializers/simplexml.py", line 386, in _validateTree
for c in self._root_element.getchildren():
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute
'getchildren'

 Unknown Horizons has crashed.

We are very sorry for this and want to fix the underlying error.
In order to do this, we need the information from the logfile:
/home/sal/.local/share/unknown-horizons/log/unknown-
horizons-2020-12-29_20-40-06.log
Please give it to us via IRC or our forum, for both see http://unknown-
horizons.org .
---


I also attached the unknown-horizons log file.

If you need more information just get back on me.

Kind regards
Steffen



-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.9.0-4-amd64 (SMP w/6 CPU threads)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages unknown-horizons depends on:
ii  python3 3.9.0-4
ii  python3-enet0.0~vcs.2017.05.26.git-2.2+b2
ii  python3-fife0.4.2-2+b3
ii  python3-future  0.18.2-5
ii  python3-yaml5.3.1-3+b1
ii  ttf-unifont 1:13.0.04-1

unknown-horizons recommends no packages.

unknown-horizons suggests no packages.

-- no debconf information

 Unknown Horizons has crashed.

We are very sorry for this and want to fix the underlying error.
In order to do this, we need the information from the logfile:
/home/sal/.local/share/unknown-horizons/log/unknown-horizons-2020-12-29_20-40-06.log
Please give it to us via IRC or our forum, for both see 
http://unknown-horizons.org .
: ":" SEP: "/"
LD_LIBRARY_PATH: 
PATH: 
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/var/lib/flatpak/exports/bin
PYTHONPATH 
Python version: sys.version_info(major=3, minor=9, micro=1, 
releaselevel='final', serial=0)
Platform: Linux-5.9.0-4-amd64-x86_64-with-glibc2.31
Using fife version 0.4.2, at least 0.4.2 required
Traceback (most recent call last):
  File "/usr/games/unknown-horizons", line 381, in 
main()
  File "/usr/games/unknown-horizons", line 122, in main
ret = horizons.main.start(options)
  File "/usr/lib/python3/dist-packages/horizons/main.py", line 113, in start
horizons.globals.fife = Fife()
  File "/usr/lib/python3/dist-packages/horizons/engine/engine.py", line 46, in 
__init__
self._setting = Settings(PATHS.USER_CONFIG_FILE, 
PATHS.SETTINGS_TEMPLATE_FILE)
  File "/usr/lib/python3/dist-packages/horizons/engine/settings.py", line 39, 
in __init__
self._settings_serializer.load(settings_file)
  File 
"/usr/lib/python3/dist-packages/fife/extensions/serializers/simplexml.py", line 
132, in load
self._validateTree()
  File 
"/usr/lib/python3/dist-packages/fife/extensions/serializers/simplexml.py", line 
386, in _validateTree
for c in self._root_element.getchildren():
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 
'getchildren'