This topic is READ ONLY
James1984 (3) [Avatar] Offline
#1
We have tried to get the Skier game running using both a hand typed version and the example file. We have run them in both IDLE and SPE and in each case we get the error message listed below. We are running on OSX 10.5.8. Any thoughts?


2011-05-22 13:57:13.917 Python[1449:10b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
Traceback (most recent call last):
File "/Users/laman/Desktop/Python/skier2.py", line 84, in <module>
map0 = create_map(20, 29)
File "/Users/laman/Desktop/Python/skier2.py", line 62, in create_map
obstacle = ObstacleClass(img, location, type)
File "/Users/laman/Desktop/Python/skier2.py", line 38, in __init__
self.image = pygame.image.load(image_file)
pygame.error: Couldn't open skier_flag.png
Script terminated.
carter.sande (32) [Avatar] Offline
#2
Re: Chapter 10 Skier Game Mac OSX problem
Hi,

The error message you sent us indicates that Python is trying to find the graphics files, but it doesn't know where they are. Try placing the image files (they're in the skier folder of the Hello_World_Examples folder) in the same folder as your program.

Thanks,
Carter
James1984 (3) [Avatar] Offline
#3
Re: Chapter 10 Skier Game Mac OSX problem
Carter,

Thanks very much. We will follow your suggestion and write back in a couple of days. We are having fun with your book so far. Thank you for writing it.

James (49) and Lam An (10)
James1984 (3) [Avatar] Offline
#4
Re: Chapter 10 Skier Game Mac OSX problem
Carter,

We followed your advice and it worked perfectly. Thanks again.

James and Lam An