21 January 2019
My book Mission Python went through extensive quality controls before publication, with each listing built and tested by both myself and the tech editor. My own testing was carried out on both the Raspberry Pi and the Windows PC.
However, I have been alerted to some errors in the book. I'll use this blog post to maintain a list of errata:
- The instructions for running Listing 4-1 say that you can run it from IDLE. This will generate an error saying that the name 'images' is not defined. To run this listing, you need to run it from the command line using pgzrun listing4-1.py. For instructions on using the command line to run Pygame Zero programs, please see the Running the Game section in the book's Introduction. When you run this program, the game window will be blank because the program sets up the data but doesn't display anything on the screen yet. If you don't see any error messages and you do see a blank window, your program is working fine. (When you reach Listing 4-3, you should start to see the room on the screen in the window.)
- The points made above also apply to Listing 4-2: you should run it using pgzrun listing4-2.py and not IDLE. The game window will be blank. You can't use the shell to test the program, but you can add instructions to the end of the program and then run it from the command line. You will see the output in the command line window. Below is some example code to add to the end of Listing 4-2 to complete Training Mission #1 in Chapter 4. Add this code right at the end of the listing, without any indentation. When you've finished testing, make sure you delete this test code to avoid any problems later on.
## Test code ## current_room = 45 generate_map() print(room_map)
- On p178, when you add the code from Listing 10-6 to Listing 10-5, you should save the program as listing10-6.py and run it with pgzrun listing10-6.py. The process and program still works if you reuse the listing10-5.py filename again as described in the book, but the correct process is to use listing10-6.py.
If you experience difficulties, please see also my blog post about compatibility with different software and hardware platforms to those officially supported by Mission Python.
Many thanks to Adriaan van Niekerk, Stéphanie Noardo, and Richard Park for telling me about these issues.
If you encounter other problems, please feel free to get in touch.