Errata
The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted By | Date submitted | Date corrected |
---|---|---|---|---|---|
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version |
chapter 2 "Beans’R’Us" |
chapter 2 "Beans’R’Us" URL no longer exists http://www.beans-r-us.biz/prices-loyalty.html Note from the Author or Editor: |
Sophia | Feb 16, 2016 | |
Printed | Page 00 Errata |
O’Reilly forums are closed. So, All the errata answers tha ponit to them should be reviewed. Note from the Author or Editor: |
Felipe Batista Cavalcante . ' . | Jan 08, 2019 | |
, Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version | Page Errata First Errata Note |
beans-r-us.appspot.com is no longer an active Appspot domain. Note from the Author or Editor: |
Anonymous | Jun 08, 2020 | |
Printed | Page 39 Program code in it's current form line 3 |
Address line is "http://www.beans-r-us.biz/prices.html" on page 39. IDLE Illustration on page 40 drops the "www." in the URL address. With the www in the address the results are different then the results in the Python Shell illustration on page 40. I think the code on page 39 should have the URL address = "http://beans-r-us.biz/prices.html" without the "www." Note from the Author or Editor: |
bill | May 12, 2010 | Jul 12, 2013 |
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version | Page 39 first illustration |
the site address: "http://www.beans-r-us.biz/prices.html" takes me to godaddy.com I found a very different site and had to work to find a solution, here's my code: import urllib.request page = urllib.request.urlopen("http://ycharts.com/indicators/world_coffee_arabica_price") text = page.read() .decode("utf8") #price = text .index("<div id="pgNameVal">") #p = text .index("pgNameVal") encontramos el indice de una cadena unica #y contigua a lo que nos interesa #buscando en el codigo html #print (p) imprimimos ese indice, contamos caracteres en el sitio para #averiguar cuanto sumarle a p #price = (p+?) nos da el caracter de inicio, contamos hasta donde queremos #imprimir y lo sumamos a p+1, esto nos da el caracter final price = text[8747:8773] print (price) Note from the Author or Editor: |
Eduardo Lopez | Sep 21, 2013 | |
Printed, PDF, ePub, Mobi, Safari Books Online | Page 42 4th Answer |
(Using an ePub, so I'm not sure the page number will help.) This typo is in the very first "There Are No Dumb Questions" segment in section 1. In the last line of the answer to the question, "There seems to be many different versions of Python. Which should I use?" the word "deciding" is misspelled "decidiing", with two 'i's. Note from the Author or Editor: |
Anonymous | Jul 24, 2014 | |
Printed, PDF, Safari Books Online | Page 48 3rd paragraph |
"Goethe" instead of "Geothe" Note from the Author or Editor: |
Anonymous | Oct 03, 2011 | Jul 12, 2013 |
Printed | Page 49 Last bullet point, bottom of the page. |
The bullet point reads: "Subtract the second index from the first to work out how long the substring should be." It should read: "Subtract the first index from the second to work out ...." As an example of the error: If the substring were, s[10:25], then subtracting the second index from the first would produce a substring with a negative length (in this case, -15)! Note from the Author or Editor: |
Harvey | Jan 06, 2010 | Jul 12, 2013 |
Printed, PDF, Safari Books Online | Page 51 Paragraph "The price moved" |
"... more dynamic than ..." instead of "... more dynamic that ..." Note from the Author or Editor: |
Anonymous | Oct 03, 2011 | Jul 12, 2013 |
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version | Page 61- 62 Code Magnets |
In the magnets exercise and solution, the code won't run unless you write: while float(price) > 4.74 instead of: while price > 4.74 Note from the Author or Editor: |
Aliza | Dec 21, 2014 | |
Printed | Page 67 The code throughout the rest of chapter 3 |
The code switches back from the loyalty pricing page to the regular pricing page for the rest of the chapter. The regular pricing is too high for the while loop to ever finish. The loyalty pricing properly completes the loop randomly. Note from the Author or Editor: |
Onelow | Aug 04, 2010 | Jul 12, 2013 |
Printed, PDF, ePub, Mobi, Safari Books Online, Other Digital Version | Page 70 near bottom |
time.timezone, which does not employ parentheses, reports in seconds, not hours Note from the Author or Editor: |
Anonymous | Sep 19, 2012 | Jul 12, 2013 |
Printed | Page 86 83-85,87 |
The float function is taken out of the example code for the get_price function listed on the pages both before and after the program listed on page 86 Note from the Author or Editor: |
Onelow | Aug 04, 2010 | |
Printed | Page 88 The answer to the 4th question |
"prgrammers" should be "programmers" |
Dawn | Apr 21, 2010 | Jul 12, 2013 |
Printed, PDF, Safari Books Online | Page 93 2nd paragraph |
Twitter say that from 16th August they no longer support basic authentication. Is there any advice on how this code can be modified? Note from the Author or Editor: |
Fraser | Aug 21, 2010 | Jul 12, 2013 |
Printed, PDF, ePub, Mobi, Safari Books Online | Page 93 send_to_twitter() figure |
The figure here (which I think is the result of the previous erratum for page 93) doesn't send "I am a message that will be sent to Twitter" as shown on page 94. Instead it already incorporates the parameterization that's the task of the Sharpen Your Pencil on pages 97-98. Note from the Author or Editor: |
Christopher Bohn | Aug 04, 2013 | |
Page 111 Programming Tools section, 7th point |
it's should be its. |
Erik Weibust | Jun 10, 2010 | Jul 12, 2013 | |
Safari Books Online | 128 In Sharpen Your Pencil box |
"You were think about what would make the program easier to" should read You were thinking... Note from the Author or Editor: |
Cathy Austin | Apr 06, 2010 | Jul 12, 2013 |
Safari Books Online | 154 "In Take each of the keys in the hash in turn" pointer |
for key in scores. keys() : print( scores[key] + ' had a score of ' + str(name_part) ) ***name_part is not defined. It should be:*** for key in scores. keys() : print( scores[key] + ' had a score of ' + str(key) ) Note from the Author or Editor: |
Cathy Austin | Apr 06, 2010 | Jul 12, 2013 |
Printed | Page 167 In the "Do this!" box |
"Be sure to put the function near the top of *you* file" should be "Be sure to put the function near the top of *your* file" |
Dawn | Apr 21, 2010 | Jul 12, 2013 |
Printed, PDF, Safari Books Online | Page 182 Sharpen your pencil Answer |
Explanatory comment about the Credit card length should point to the first "%16s" not the last which formats the Description. Note from the Author or Editor: |
Fraser | Aug 23, 2010 | Jul 12, 2013 |
Printed | Page 183 Third line of code from the top of the page. |
On p. 182, the format string we were to create appears thus: "%16s%07d%16s\n" % (credit_card, price * 100, description). On p. 183, however, we are told that the following is the string that we just created (the one that we're supposed to use in the code): "%s%07d%s\n" % (credit_card, price * 100, description). The second version is missing both instances of the sixteen-character padding formatting element. The result of this is that, in the transactions file, the description is not separated from the price by any spaces. Note from the Author or Editor: |
Harvey | Jan 15, 2010 | Jul 12, 2013 |
Printed | Page 194 ff Various places. |
The following error is one of inconsistency (but it's trivial). In chapter six the price of a latte is $2.0, until you get to p. 194. Beginning on p. 194, and for the rest of the chapter, the price of a latte is $2.20. |
Harvey | Jan 15, 2010 | |
Printed, PDF, Safari Books Online | Page 212 Both sample transaction printouts |
The braces for the comment have slipped sideways so instead of marking the price, they include the first digit of the credit card number. Note from the Author or Editor: |
Fraser | Aug 23, 2010 | Jul 12, 2013 |
Printed | Page 255 The "Python Tools" section |
In the "Python Tools" section appearing at the end of chapter seven, we are told that we covered Python's "break" statement. This is incorrect: the "break" statement is NOT covered in chapter seven. Note from the Author or Editor: |
Harvey | Jan 23, 2010 | Jul 12, 2013 |
Printed | Page 288 Bottom of the save_data() function |
Near the end of the save_data() function, the following line appears twice: description.delete(0, END). It should appear once, only. Note from the Author or Editor: |
Harvey | Jan 24, 2010 | Jul 12, 2013 |
Printed | Page 296 ff. All of Chapter Eight |
In my previous errata submission I pointed out the following typo: "Near the end of the save_data() function, the following line appears twice: description.delete(0, END). It should appear once, only." I have discovered that this typo is repeated in every occurrence of the "save_data()" function that appears in chapter eight. It occurs seven times. Note from the Author or Editor: |
Harvey | Jan 25, 2010 | Jul 12, 2013 |
Printed | Page 341 first column |
the first answer was talking about typos and there was actually a typo. “As using the word “from” makes a lot of sense when taking about a scale” (probably should be talking). If that was intentional, you got me… |
![]() David Griffiths |
Jan 04, 2010 | Jul 12, 2013 |
Printed | Page 357 2nd para |
"checkoxes" should be "checkboxes" |
![]() David Griffiths |
Jan 04, 2010 | Jul 12, 2013 |
Printed | Page 360 Near bottom of code |
The code from this page on uses "track.stop()" in the shutdown() function. It should read "mixer.stop()". The code on the book's website reflects this change, however, the printed book does not. Also an issue on page(s) 374, 379 and 380. |
![]() Paul Barry |
Feb 16, 2010 | Jul 12, 2013 |