We try to keep our books accurate, but sometimes mistakes creep
in. This page lists the errors submitted by our astute readers.
If you've found a new error, please
submit it.
The latest version of the book is P1.0,
released about 2 years ago.
If you've bought a PDF of the book and would like to upgrade
it to this version (for free), visit your
home page.
| PDF |
Paper |
Description |
Found in |
Fixed in |
| 32 |
|
#47077: 'debugging' -> 'debugger'--William McQueen
|
P1.0
18-May-11
|
|
| 60 |
|
#46918: Section: Retrieving Persistent Objects
The GQL query should be ... ORDER BY timestamp (not time)--Konstantin Bernhardt
|
P1.0
21-Apr-11
|
|
|
62 |
#48478: The author has chosen not to display the Import statements as he modifies the code going from oen chapter to the next and that means those lines are missing when I write the code myself and so my code errors out when run. I have to search online for the right imports (e.g., "from google.appengine.api import users" and "import sys" for this User login chapter) and then my code works. This is not ideal, IMO.--Peter #48478: The author has chosen not to display the Import statements as he modifies the code going from oen chapter to the next and that means those lin ...more...
|
P1.0
08-Jan-12
|
|
|
63 |
#48479: In the "post" code for the login-chat example, these two lines are shown in the wrong order so the program errors until these lines are swapped:
# START: PostHandler
def post(self):
if user is None:
self.redirect(users.create_login_url(self.request.uri))
user = users.get_current_user()
You can't say "if user is None" unless you've tried to instantiate "user" first. --Peter #48479: In the "post" code for the login-chat example, these two lines are shown in the wrong order so the program errors until these lines are swappe ...more...
|
P1.0
08-Jan-12
|
|
|
63 |
#49306: In the post method, the ChatMessage should be passed the variable "nick" instead of "user.nickname()" since the previous lines of code check for an undefined user.nickname().
In other words...
msg = ChatMessage(user=user.nickname(), message=msgtext)
should be:
msg = ChatMessage(user=nick, message=msgtext)
Note: Since the book requires Python 2.5, you could also shorten the code for the nickname to use the ternary in Python 2.5 and up:
so...
if user.nickname() is None or user.nickname() == "":
nick = "No Nickname"
else:
nick = user.nickname()
becomes...
nick = "No Nickname" if (user.nickname() is None or user.nickname == "") else user.nickname()
--Victor Cosby #49306: In the post method, the ChatMessage should be passed the variable "nick" instead of "user.nickname()" since the previous lines of code check f ...more...
|
P1.0
11-May-12
|
|
|
63 |
#49307: In the post method, the ChatMessage should be passed the variable "nick" instead of "user.nickname()" since the previous lines of code check for an undefined user.nickname().
In other words...
msg = ChatMessage(user=user.nickname(), message=msgtext)
should be:
msg = ChatMessage(user=nick, message=msgtext)
Note: Since the book requires Python 2.5, you could also shorten the code for the nickname to use the ternary in Python 2.5 and up:
so...
if user.nickname() is None or user.nickname() == "":
nick = "No Nickname"
else:
nick = user.nickname()
becomes...
nick = "No Nickname" if (user.nickname() is None or user.nickname() == "") else user.nickname()
--Victor Cosby #49307: In the post method, the ChatMessage should be passed the variable "nick" instead of "user.nickname()" since the previous lines of code check f ...more...
|
P1.0
11-May-12
|
|
| 64 |
|
#46919: Line 2 should be DATETIME.datetime.now() - DATETIME.timedelta(minutes=5)
and the GQL query should be WHERE timestamp > :fiveago ORDERED BY TIMESTAMP", fiveago=DATETIME.datetime.now() - DATETIME.timedelta(minutes=5))
(dont forget to change the gql query on line 13 and 14)--Konstantin Bernhardt #46919: Line 2 should be DATETIME.datetime.now() - DATETIME.timedelta(minutes=5)
and the GQL query should be WHERE timestamp > :fiveago ORDERED BY TI ...more...
|
P1.0
21-Apr-11
|
|
| 66 |
|
#46920: line 10: ... to use USE GAE's login service. (one use too much?)--Konstantin Bernhardt
|
P1.0
21-Apr-11
|
|
| 69 |
|
#46921: The indentation level of the first if statement in the post method is wrong. But it's correct in the pchat.py source file.--Konstantin Bernhardt
|
P1.0
21-Apr-11
|
|
| 69 |
|
#46922: I'm sorry. The indentation of the first if statement in the post method in the pchat.py source file is wrong too.--Konstantin Bernhardt
|
P1.0
21-Apr-11
|
|
| 69 |
|
#46923: post method:
the local variable user is read before assignment. move the 3rd line (user = users.get ...) to the top of the post methods body--Konstantin Bernhardt
|
P1.0
21-Apr-11
|
|
|
70 |
#49926: Downloaded both the template-chat files, and the multi-chat files. Can't seem to get either of them to work. Am getting a "raise BadValueError('Property %s is required' % self.name) BadValueError: Property chat is required" ... Any ideas?--Steve #49926: Downloaded both the template-chat files, and the multi-chat files. Can't seem to get either of them to work. Am getting a "raise BadValueError ...more...
|
P1.0
05-Oct-12
|
|
| 70 |
|
#49927: Downloaded both the template-chat files, and the multi-chat files. Can't seem to get either of them to work. Am getting a "raise BadValueError('Property %s is required' % self.name) BadValueError: Property chat is required" ... Any ideas?
SOLVED - Had been using chatone all the way through on dev_appserver.py and had just been updating the app.yaml page to point to a new python file with each new exercise.
Typing "dev_appserver.py --clear_datastore chatone" in terminal fixed my problems above.--Steve #49927: Downloaded both the template-chat files, and the multi-chat files. Can't seem to get either of them to work. Am getting a "raise BadValueError ...more...
|
P1.0
05-Oct-12
|
|
| 71 |
|
#46587: Authentication description is very limited in the book and adds little value to what is available in google's own "getting started" tutorial
Some insight about how to authenticate using an alternative provider (facebook, openid) and how to glue it all together would be very valuable.--Sylvain Tenier #46587: Authentication description is very limited in the book and adds little value to what is available in google's own "getting started" tutorial
...more...
|
B8.0
16-Mar-11
|
|
| 78 |
|
#46394:
In the code for the master.html template, there is a loop that prints <li> elements for the primary navigation section.
Within that loop, the line that prints the actual link has the following code:
<li><a href="{{ c.url }}">c.name</a></li>
This line should have the chat name in curly brackets, like so:
<li><a href="{{ c.url }}">{{ c.name }}</a></li>
--Tom Malone #46394:
In the code for the master.html template, there is a loop that prints <li> elements for the primary navigation section.
Within that loop, ...more...
|
B7.0
13-Feb-11
|
|
| 82 |
|
#46941: I tried to run the source code from chapter 6 and got the following error:
no matching index found.
This query needs this index:
- kind: ChatMessage
properties:
- name: chat
- name: timestamp
I'm new to GAE so this error message didn't help me much, at first. It took me some time to figure it out.
I also got an error message related to the chat field, which was introduced to the model on page 82.
I think it would help many readers new to GAE who are following the steps mentioned in the book to build the chat application, if you would mention the index.yaml file and its purpose.
I found the solution to those problems, when I downloaded the code shipped with the book.--Konstantin Bernhardt #46941: I tried to run the source code from chapter 6 and got the following error:
no matching index found.
This query needs this index:
- kind: ...more...
|
P1.0
24-Apr-11
|
|
| 94 |
|
#47136: The closing body tag </body> is in the wrong place. In the document, it has been placed within the closing div tag for the content div.
Move the closing body tag to the line before the closing html tag. #47136: The closing body tag </body> is in the wrong place. In the document, it has been placed within the closing div tag for the content div.
Mov ...more...
|
P1.0
31-May-11
|
|
| 128 |
|
#47005: 4th paragraph:
GreetingServiceImpl.java is not in the client package, it's in the server package.
I think you mean that GreetingServiceAsync.java is in the client package.--Konstantin Bernhardt #47005: 4th paragraph:
GreetingServiceImpl.java is not in the client package, it's in the server package.
I think you mean that GreetingServiceAsync ...more...
|
P1.0
30-Apr-11
|
|
| 137 |
|
#47006: 2) The service interface declaration must extend >>T<<he GWT interface--Konstantin Bernhardt
|
P1.0
30-Apr-11
|
|
| 158 |
|
#47007: Is the bottomPanel a HorizontalPanel or a VerticalPanel.
In the source code bottomPanel is a HorizontalPanel, but in the description it is a VerticalPanel--Konstantin Bernhardt #47007: Is the bottomPanel a HorizontalPanel or a VerticalPanel.
In the source code bottomPanel is a HorizontalPanel, but in the description it is a ...more...
|
P1.0
01-May-11
|
|
| 159 |
|
#47008: Does the title label get the style apptitle or title?
In the source code (p. 158) it gets title.
--Konstantin Bernhardt
|
P1.0
01-May-11
|
|
| 159 |
|
#47009: "(There is a setStyle name, but ..." <- setStyleName not setStyle name--Konstantin Bernhardt
|
P1.0
01-May-11
|
|
| 159 |
|
#47010: (3)
In the code above, we called addStyle to alter the appearance <- addStyleName
--Konstantin Bernhardt
|
P1.0
01-May-11
|
|
| 166 |
|
#47487: /** Fired when the user types in the nameField. */
"nameField" should be "messageBox"--Dotun Kola-Olaleye
|
P1.0
02-Sep-11
|
|
| 170 |
|
#47019: 11.6 The GWT Widget Gallery. . .
I think it's best to provide a link to the newest WidgetGallery.
.../webtoolkit/doc/1.6/RefWidgetGallery.html <- change 1.6 to latest--Konstantin Bernhardt #47019: 11.6 The GWT Widget Gallery. . .
I think it's best to provide a link to the newest WidgetGallery.
.../webtoolkit/doc/1.6/RefWidgetGaller ...more...
|
P1.0
03-May-11
|
|
| 171 |
|
#47020: We’ll examine WE else we need in our server
--Konstantin Bernhardt
|
P1.0
03-May-11
|
|
| 2007 |
WwaUw |
#49572: They are just jealous, twiknie eating, women who are upset that we've called them out on the things their friends only say behind their back and not to their face lols--uvWfQNhn #49572: They are just jealous, twiknie eating, women who are upset that we've called them out on the things their friends only say behind their back ...more...
|
P1.0
26-Jul-12
|
|