[Dev] crash in GetLightOpacityStringForSurface with revision 229

James Paige Bob at HamsterRepublic.com
Mon Oct 27 10:04:16 PDT 2008


When I try to run using revision 229, I get a crash in 
GetLightOpacityStringForSurface where it says

    return pygame.image.tostring(surface, "RGBA_PREMULT", True)
ValueError: Unrecognized type of format

Here is the full traceback

---
James

james at doomtrain:~/src/mhgames/sidescroller$ python sidescroller.py
Failed to find asset camera of type <class 'movement.SpeedStyle'>
Traceback (most recent call last):
  File "sidescroller.py", line 105, in <module>
    game.run_game()
  File "/usr/lib/python2.5/site-packages/motherhamster/hamsterwheel.py", 
line 295, in run_game
    self._draw()
  File "/usr/lib/python2.5/site-packages/motherhamster/hamsterwheel.py", 
line 336, in _draw
    self.draw()
  File "sidescroller.py", line 85, in draw
    self.player.draw()
  File "/home/james/src/mhgames/sidescroller/player.py", line 104, in 
draw
    self.display.render(body, pos, scale=scale)
  File "/usr/lib/python2.5/site-packages/motherhamster/displayGL.py", 
line 409, in render
    self.pack_image(image)
  File "/usr/lib/python2.5/site-packages/motherhamster/displayGL.py", 
line 229, in pack_image
    if pack.pack_image(image):
  File "/usr/lib/python2.5/site-packages/motherhamster/displayGL.py", 
line 127, in pack_image
    pixels = GetLightOpacityStringForSurface(image.surface)
  File "/usr/lib/python2.5/site-packages/motherhamster/displayGL.py", 
line 33, in GetLightOpacityStringForSurface
    return pygame.image.tostring(surface, "RGBA_PREMULT", True)
ValueError: Unrecognized type of format



More information about the Dev mailing list