pyskool icon indicating copy to clipboard operation
pyskool copied to clipboard

Parameter 'width' is invalid

Open musuruan opened this issue 7 months ago • 2 comments

I was just playing skool daze again after some years.

I had to apply this patch to run it under Fedora 42: https://github.com/skoolkid/pyskool/commit/7b21a534f1c0e647ddcc6544144e68479367364c

But after a bubble appears on screen, I always get the following error:

$ /usr/bin/skool_daze.py
<frozen importlib._bootstrap>:488: RuntimeWarning: Your system is avx2 capable but pygame was not built with support for it. The performance of some of your blits could be adversely affected. Consider enabling compile time detection with environment variables like PYGAME_DETECT_AVX2=1 if you are compiling without cross compilation.
pygame 2.6.1 (SDL 2.32.56, Python 3.13.7)
Hello from the pygame community. https://www.pygame.org/contribute.html
Using ini file at /usr/lib/python3.13/site-packages/pyskool/data/pyskool.ini
Using game ini files in /usr/share/pyskool/ini/skool_daze
Using images in /usr/share/pyskool/images
Using sounds in /usr/share/pyskool/sounds
Using /home/andrea/.pyskool to save/load games
Reading /usr/lib/python3.13/site-packages/pyskool/data/pyskool.ini
Reading /usr/share/pyskool/ini/skool_daze/command_lists.ini
Reading /usr/share/pyskool/ini/skool_daze/config.ini
Reading /usr/share/pyskool/ini/skool_daze/font.ini
Reading /usr/share/pyskool/ini/skool_daze/lessons.ini
Reading /usr/share/pyskool/ini/skool_daze/messages.ini
Reading /usr/share/pyskool/ini/skool_daze/skool.ini
Reading /usr/share/pyskool/ini/skool_daze/sprites.ini
Traceback (most recent call last):
  File "/usr/bin/skool_daze.py", line 24, in <module>
    main(os.path.abspath(os.path.dirname(__file__)))
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pyskool/run.py", line 238, in main
    game.play()
    ~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyskool/game.py", line 386, in play
    if self._main_loop():
       ~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyskool/game.py", line 461, in _main_loop
    self.scroll = self.skool.move_characters()
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyskool/skool.py", line 272, in move_characters
    return self.cast.move()
           ~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyskool/cast.py", line 150, in move
    movable.move()
    ~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyskool/character.py", line 1686, in move
    self.command_list.command()
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/pyskool/ai.py", line 108, in command
    subcommand = command.execute()
  File "/usr/lib/python3.13/site-packages/pyskool/ai.py", line 1110, in execute
    if self.character.say(self.words, self.shift):
       ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pyskool/character.py", line 313, in say
    self.bubble[2], done = self.screen.get_bubble(words, lip_pos, shift)
                           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/pyskool/graphics.py", line 485, in get_bubble
    text_window = text.subsurface((text_x, 0), (width, tile_width))
pygame.error: Parameter 'width' is invalid

musuruan avatar Sep 04 '25 14:09 musuruan

I think this is fixed now by 8110d4ad9d7bdd9e383e1ad58b6d1c76f6736ef7.

skoolkid avatar Sep 05 '25 20:09 skoolkid

Thanks, it works.

musuruan avatar Sep 06 '25 06:09 musuruan