rpi_lcars icon indicating copy to clipboard operation
rpi_lcars copied to clipboard

pygame.error: File is not a Windows BMP file

Open keenan-v1 opened this issue 4 years ago • 7 comments

Raspberry Pi 4 running Raspbian Buster Slim using the Adafruit 7" Touchscreen display.

Using ./run.sh gets me to this error message:

Traceback (most recent call last):
  File "lcars.py", line 8, in <module>
    config.SOUND)
  File "/home/pi/rpi_lcars/app/ui/ui.py", line 30, in __init__
    self.screen.setup(self.all_sprites)
  File "/home/pi/rpi_lcars/app/screens/authorize.py", line 16, in setup
    all_sprites.add(LcarsBackgroundImage("assets/lcars_screen_2.png"),
  File "/home/pi/rpi_lcars/app/ui/widgets/background.py", line 14, in __init__
    self.image = pygame.image.load(image).convert()
pygame.error: File is not a Windows BMP file

I've verified that Pillow is installed and all needed libraries are installed. Any assistance would be appreciated.

keenan-v1 avatar Jun 13 '20 03:06 keenan-v1

I have the same exact problem, running Raspberry Pi 4 with 4gb memory and Raspbian Buster full OS on a 10.1 inch touch screen display. Please help

FCPTRiddle avatar Jan 20 '21 15:01 FCPTRiddle

I searched the error message and found some posts, maybe this is relevant: https://stackoverflow.com/questions/25120883/how-to-uninstall-pygame-on-mac-osx-10-9-4

tobykurien avatar Feb 02 '21 08:02 tobykurien

just had the same issue after dist-upgrade to Buster.

the resolution was the fact the SDL libraries were not installed.

topcats avatar Feb 20 '21 23:02 topcats

I am still new to raspberry pi. If the resolution is the SDL libraries were not installed how do I install those?

Please help

Eric Riddle [email protected]

On Feb 20, 2021, at 6:32 PM, Topcat [email protected] wrote:

just had the same issue after dist-upgrade to Buster.

the resolution was the fact the SDL libraries were not installed.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/tobykurien/rpi_lcars/issues/27#issuecomment-782765486, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR4SXPI3W3Z67OQ7I3MHYW3TABBCTANCNFSM4N4Z3EJA.

FCPTRiddle avatar Feb 21 '21 11:02 FCPTRiddle

The easiest way, will be install using the command line

  1. Open a terminal window
  2. sudo apt update
  3. sudo apt install libsdl-gfx1.2-5 libsdl-image1.2 libsdl-kitchensink1 libsdl-mixer1.2 libsdl-sound1.2 libsdl-ttf2.0-0 libsdl1.2debian libsdl2-2.0-0 libsdl2-gfx-1.0-0 libsdl2-image-2.0-0 libsdl2-mixer-2.0-0 libsdl2-ttf-2.0-0
  4. Try again, all should be good.

topcats avatar Feb 22 '21 18:02 topcats

Thank you very much! I met the same problem on my Raspberry Pi, thanks to you it's solved :)

Scinape avatar Feb 08 '23 09:02 Scinape

nice one, was chasing my tail for a while and topcats instruction fixed it.

bluush avatar Mar 07 '23 20:03 bluush