Pygame.error: File Is Not A Windows Bmp File On M1 Mac Running Mac Os Monteray
Solution 1:
You try to load spaceship_yellow.png
and spaceship_red.png
which judging from extensions are PNG
s not BMP
s, your error
pygame.error: File isnot a Windows BMP file
suggest that pygame is expecting BMP
file. pygame.image docs says
The image module is a required dependency of pygame, but it only optionally supports any extended file formats. By default it can only load uncompressed BMP images. When built with full image support, the
pygame.image.load()
function can support the following formats.
then enumarate formats, apparently you do not have full image support, I think simplest solution is to convert PNG
s you have to uncompressed BMP
image format.
Solution 2:
Turning the image to a BMP does work but I would rather still have the full functionality of pygame. What I did to finally make it work was from a thread here. I put this in the terminal to get it working:
python3 -m pip install git+https://github.com/nelsonlove/pygame.git
This will update your pygame to version 2.0.2.dev1, modified for m1 Mac.
Post a Comment for "Pygame.error: File Is Not A Windows Bmp File On M1 Mac Running Mac Os Monteray"