The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
abrice (1) [Avatar] Offline
#1
Thanks so much, Warren and Carter, for such a fabulous book! I am teaching myself programming and don't have any previous experience. Your book fits the bill perfectly. And it makes programming approachable and fun, which I greatly appreciate.

I made it to Chapter 10 and typed in the code for the skier game. I repeatedly get the following error message, even after initially installing the code from your website and repairing it, as well.

Traceback (most recent call last):
File "C:/Users/Alicia/Desktop/Python/skier.py", line 70, in <module>
skier = SkierClass()
File "C:/Users/Alicia/Desktop/Python/skier.py", line 9, in __init__
self.image = pygame.image.load("skier_down.png")
error: Couldn't open skier_down.png

The skier files are in the following path. Are they in the wrong place?

C:UsersAliciaDownloadsHelloWorld2_source_code.zip

Thanks so much!

Regards,

Alicia
zangree (1) [Avatar] Offline
#2
Re: Issues with skier code
I had the same problem as you. Finally I found I put the picture in the wrong folder. So here is my solution. Where you execute the *.py, where you put the picture in.