473,395 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

[ask]could not open pic in pygame

1
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:
Expand|Select|Wrap|Line Numbers
  1. Traceback (most recent call last):
  2.   File "C:/Python25/game/1st project", line 12, in <module>
  3.     xxx=pygame.image.load(ikon)
  4. error: Couldn't open pic\pic2
  5.  
i'm very thanksful for the all answer
Mar 7 '08 #1
2 2378
jlm699
314 100+
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:
Expand|Select|Wrap|Line Numbers
  1. Traceback (most recent call last):
  2.   File "C:/Python25/game/1st project", line 12, in <module>
  3.     xxx=pygame.image.load(ikon)
  4. error: Couldn't open pic\pic2
  5.  
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
Mar 7 '08 #2
elcron
43
It looks like your missing the extension.
ie. *.jpg *.gif *.png etc.
Mar 7 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Askari | last post by:
(Help for Pygame module) Hi, How I can make a "fadeout text"(alpha at 255,254,253...0) on a surface and my surface's background must be transparatly? Note : I can do a fadeout but with a...
1
by: maxime | last post by:
Hi, I try to develop a game in python and pygame. In my game I play a music (.mid with pygame.mixer.music) but sometime I need to accelerate it but I don't see how to do that with pygame. Is it...
1
by: alcueca | last post by:
Hi, I've been programming with python and pygame for a year now, I started a RPG game, did some small toy apps (like exploring mandelbrot set) and an entire End-of-Career project about...
2
by: Nathan Pinno | last post by:
Hi, Can anyone tell me if pygame and Tkinter can work together in the same application? I thought I'd better ask before trying it, since both use widgets. Thanks, Nathan Pinno --
2
by: kishkin | last post by:
Hello everybody! I just want to make window transparent. ;) At this moment I've found only ideas of taking screenshots to make background... Anything else? Thanks for help!
5
by: Gregory Piñero | last post by:
Hi guys, I was just idley curious on what it would take to make a web plug-in for Pygame. I'm picturing it working the way my browser currently shows flash games. Is such an idea even...
1
by: liuliuliu | last post by:
hi -- sorry if this is trivial -- but how do you make a screenshot of a pygame display? i have a surface which is basically the entire visible screen -- how do you write this surface as an image...
5
by: enquiring mind | last post by:
Running 2.4.1 Python (learning) Running SUSE Linux 10 Am learning from a new books that mostly deals with windows python and Pygames called "Game Programming" by Randy Harris (2007) His books...
1
by: shanmugamit | last post by:
i want open word document in frame but its ask open or save file..not open in frame....here is my code <frameset cols="120,*"> <frame src='sample.html'> <frame name='openfile' src='sample.doc'>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.