Bug#978657: unknown-horizons: Crash on startup

2021-02-19 Thread Phil Morrell
Control: tags -1 +patch
Control: clone -1 -2
Control: retitle -2 unknown-horizons: Crash with unexpected keyword argument 
'encoding'
Control: reassign -2 unknown-horizons
thanks

I can confirm that this has been fixed upstream:

https://github.com/fifengine/fifengine/commit/cf295fd98a8fba080f6305c27be56d10ab7ce94d.patch

However, now the crash is in unknown-horizons itself, encoding has been
ignored since 3.1 so should simply be removed.

Discovered old settings file, auto-upgrading: 1 -> 38
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 179, in start
Entities.load(horizons.globals.db, load_now=False) # create all 
references
  File "/usr/lib/python3/dist-packages/horizons/entities.py", line 64, in 
load
cls.load_grounds(db, load_now)
  File "/usr/lib/python3/dist-packages/horizons/entities.py", line 77, in 
load_grounds
tile_sets = TileSetLoader.get_sets()
  File 
"/usr/lib/python3/dist-packages/horizons/util/loaders/tilesetloader.py", line 
72, in get_sets
cls.load()
  File 
"/usr/lib/python3/dist-packages/horizons/util/loaders/tilesetloader.py", line 
65, in load
cls.tile_sets = JsonDecoder.load(PATHS.TILE_SETS_JSON_FILE)
  File 
"/usr/lib/python3/dist-packages/horizons/util/loaders/jsondecoder.py", line 40, 
in load
return json.load(f, encoding="ascii", object_hook=_decode_dict)
  File "/usr/lib/python3.9/json/__init__.py", line 293, in load
return loads(fp.read(),
  File "/usr/lib/python3.9/json/__init__.py", line 359, in loads
return cls(**kw).decode(s)
TypeError: __init__() got an unexpected keyword argument 'encoding'


signature.asc
Description: PGP signature


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'