Bug#1092627: pyracerz: Tracks fail to load: 'ConfigParser' object has no attribute 'readfp'

Mike Small smallm at sdf.org
Fri Jan 10 04:00:42 GMT 2025


Package: pyracerz
Version: 0.2+dfsg-3
Severity: important
Tags: patch upstream
X-Debbugs-Cc: smallm at sdf.org

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
    I started the game and made menu selections up to the point when
    the race should start.
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
    1. I started pyracerz from the command line and the opening screen
       came up with a race car sound. The xterm I start it from showed
       these messages:

    12% pyracerz
    pygame 2.6.1 (SDL 2.30.11, Python 3.13.1)
    Hello from the pygame community. https://www.pygame.org/contribute.html
    Cannot use psyCo...
    
    2. From the opening menu I pressed enter with "Single Race" selected.
    3. The screen changed to one with header "singleRace: chooseTrack.
       I pressed enter with the default < bio > track selected.
    4. Next came the screen with header "singleRace: chooseNbLaps" I
       pressed enter with 1 selected.
    5. Next it was "singleRace: chooseNbHumanPlayers". I down arrowed
       to 1 and pressed enter.
    6. Next "singleRace: chooseHumanPlayer1". I pressed up error to
       select GO and pressed enter, which accepted the default settings.
    7. Next "singleRace: chooseNbRobotPlayers". I pressed enter with 0
       selected.
    8. The graphical window closed, the program terminated, and the
       xterm I started it from showed these two new messages:
       
       Cannot load track : 
       'ConfigParser' object has no attribute 'readfp'
       
   * What was the outcome of this action?
   The game couldn't be played. Only the options could selected. 
   The error messages above appeared on my xterm.
   * What outcome did you expect instead?
   For the race to start.

   It looks like python 3.2 removed readfp from the ConfigParser class
   and replaced it with read_file. You can see
   "New in version 3.2: Replaces readfp()" under the read_file entry
   here in Python 3.2 documentation:
   https://docs.python.org/3.2/library/configparser.html#configparser-objects
   Contrast that with Python 3.1 documentation that still has readfp
   (under the RawConfigParser base class):
   https://docs.python.org/3.1/library/configparser.html#rawconfigparser-objects

   When I patched and built the source package locally with readfp
   renamed to read_file I could get to the track screen and play the
   game. I'm attaching the patch replace-readfp.patch which should
   apply cleanly after the other patches have applied (i.e. after
   font-replacement.patch).

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.8-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.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 pyracerz depends on:
ii  fonts-radisnoir  0.9b-5
ii  python3          3.13.1-2
ii  python3-pygame   2.6.1-1

pyracerz recommends no packages.

pyracerz suggests no packages.

-- no debconf information



More information about the Pkg-games-devel mailing list