[ask]could not open pic in pygame

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adhan
    New Member
    • Dec 2007
    • 1

    [ask]could not open pic in pygame

    hi all,
    i'm new in pygame and i'm trying to make my first excercise with following tutorial in pygame website,but when i'm try to execute the program, the idle will show error like this:
    Code:
    Traceback (most recent call last):
      File "C:/Python25/game/1st project", line 12, in <module>
        xxx=pygame.image.load(ikon)
    error: Couldn't open pic\pic2
    i'm very thanksful for the all answer
    Last edited by adhan; Mar 7 '08, 01:47 PM. Reason: wrong spell
  • jlm699
    Contributor
    • Jul 2007
    • 314

    #2
    Originally posted by adhan
    hi all,
    i'm new in pygame and i'm trying to make my first excercise with following tutorial in pygame website,but when i'm try to execute the program, the idle will show error like this:
    Code:
    Traceback (most recent call last):
      File "C:/Python25/game/1st project", line 12, in <module>
        xxx=pygame.image.load(ikon)
    error: Couldn't open pic\pic2
    That sounds like you don't have a directory pic\ from your working directory.... try doing an os.getcwd() to see what you're current working directory is, and try changing the path accordingly so that IDLE can find that path

    Comment

    • elcron
      New Member
      • Sep 2007
      • 43

      #3
      It looks like your missing the extension.
      ie. *.jpg *.gif *.png etc.

      Comment

      Working...