Sign in with
Sign up | Sign in
Your question
Solved

Python Image Loading Problem

Tags:
  • Python
  • Image
Last response: in Linux/Free BSD
Share
May 4, 2014 3:12:28 AM

hi guys I am using python to code a program not really very new to this language and need help here's the problem the code isn't loading the images i'm a bit confused if someone could help thanks a lot here's the code:

http://pastebin.com/bxepyEqW

any help much appreciated thanks P.S sorry for my spelling and grammar mistakes in a rush thanks :) 

More about : python image loading problem

Best solution

May 24, 2014 9:34:44 PM

One thing I noticed is the syntax on line 18. The word alpha is spelled aplha:

background1 = pygame.image.load("images/background1.png").convert_aplha()

Are you running Python as root? Do you have permission to access the images folder path? Do you have to be the owner of the folder or the images?

You could try making it a literal string with single quotes:

background1 = pygame.image.load('images/background1.png').convert_alpha()
Share
!