Bug#710162: whichwayisup: fails to start because of pygame.error: Invalid joystick axis
Markus Koschany
apo at gambaru.de
Tue May 28 16:53:15 UTC 2013
Package: whichwayisup
Version: 0.7.9-2
Severity: important
Dear Maintainer,
whichwayisup fails to start with the following error message:
Traceback (most recent call last):
File "run_game.py", line 13, in <module>
main.main()
File "/usr/share/games/whichwayisup/lib/main.py", line 103, in main
end_trigger = game.run(screen, level_name, world.index, score, joystick)
File "/usr/share/games/whichwayisup/lib/game.py", line 263, in run
inputs = parse_inputs(joystick)
File "/usr/share/games/whichwayisup/lib/game.py", line 143, in parse_inputs
axis0 = joystick.get_axis(0)
pygame.error: Invalid joystick axis
After some investigation i have found out that the game, respectively
pygame, detects my USB keyboard as a joystick. Since a keyboard
obviously does not have axes, whichwayisup throws an exception.
I believe that the following check should be sufficient in game.py
line 141
if joystick != None and joystick.get_numaxes() != 0: # Parse joystick input
I'm going to implement the patch and prepare a new revision.
Regards,
Markus
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages whichwayisup depends on:
ii python 2.7.3-5
ii python-ogg 1.3+repack-5+b2
ii python-pygame 1.9.1release+dfsg-8
ii ttf-dejavu-core 2.33+svn2514-3
whichwayisup recommends no packages.
whichwayisup suggests no packages.
-- no debconf information
More information about the Pkg-games-devel
mailing list