[Tutor] pygame error

Alan Gauld alan.gauld at btinternet.com
Thu Nov 28 02:39:20 CET 2013


On 27/11/13 19:13, Vipul Sharma wrote:
> Hello ! I am a beginner in pygame, i was just trying a simple pygame
> program where I wanted to load an image (.png) from the same directory
> where my actual source code was.
> I wrote this line in my source code to load the image :
>
> Img = pygame.image.load('cat.png')
>
> But I got a traceback :
>
> pygame.error: File is not a Windows BMP file

I don't know Pygame but it looks like it expects a bitmap image
type as an argument. But try the Pygame mailing list for more
expert advice.

BTW when posting error messages it really helps if you post the complete 
error traceback not just the last line.

HTH
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list