Team Photo

Just a team photo. Great PyWeek. =)

(log in to comment)


Hi guys.

I'm having trouble getting your game to work at all. When I unzip it, it keeps telling me the files are encrypted, and when I try to run it, python tells me it can't open "images/icon.png"

After some faffing, I got it working, but I don't know how...
Yeesh, sorry to hear you had trouble with the game, ahdok! May I ask what OS you are using? I've heard someone say it didn't work on Linux. My guess is that in your case, the game was in a restricted directory and the program couldn't access it, but I might be wrong.
Tried on Linux and it crashed with the same error as ahdok.
The problem lies in the fact that very often you didn't use os.path.join in your code.
All the paths that you construct by doing directory + "\\images\\myimage.png"  are wrong because other OS (like Linux) don't use "\" as path separator.
You should do something like:
os.path.join(directory, "images", "myimage.png")
to get the path string right on all OS.

I also noticed I couldn't load "Alphabeta.ttf" because the file is actually "alphabeta.ttf" (Windows is not case-sensitive, but Linux is!).

After replacing all string path concatenations with os.path.join function and renaming the file to "Alphabeta.ttf", it worked :)
I forgot:
it was also asking for some images located into data/images, while in the zip there is no directory data, just images straight away (in folder).
Also, your Zip had most of the files placed in DrGoldenstein folder, with the exception of a __MACOSX folder outside --> all your files should be in DrGoldenstein, to avoid producing so called tar-bombs.

Oh, and the game was fun ;)