The errata list is a list of errors and their corrections that were found after the product was released.
The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.
Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
| Version | Location | Description | Submitted by | Date submitted |
|---|---|---|---|---|
| O'Reilly learning platform | Page Chapter 3. FastAPI Tour HTTP Responses --> Status Code |
I'm enjoying this book very much so far (chapter 3). I am very, very confident that it will stay that way :) |
Ralf Schmitt | Dec 31, 2023 |
| O'Reilly learning platform | Page Example 3-24 Example 3-24 |
Example, when run with HTTPie returns a HTTP/1.1 405 - Method Not Allowed |
Ken LaCrosse | May 17, 2024 |
| Page Page 79, Example 6-1. |
code: |
Anonymous | Jun 05, 2024 | |
| ePub | Page Example 3-26 @app.post("/agent") |
POST method used in the example causes the following answer: |
Tomasz Janicki | Jul 04, 2024 |
| O'Reilly learning platform | Page Chapter 3. FastAPI Tour, Section : HTP Responses 4th Para (Status Code) |
In the source code the status code should be defined in path parameter |
Subhadeep | Jul 16, 2024 |
| ePub | Page Examples 9-4, 12-14 Varies |
in eample 9-3, service/test_creature.py contains "from service import creature as code" while in example 12-14 there is no such import. In the files downloaded from Git, fastapi main/src/test/unit/service/test_explorer.py, the statement is "from web import creature", while in .../unit/web/test_explorer.py contains "from web import explorer |
John Terry | May 23, 2025 |
| Other Digital Version | Example 8-13, Page 106 Inside the for loop in get_one() function definition |
The get_one function performs a case sensitive string comparison (_creature.name == name). But, the unit test in Example 9-3 pass a lowercase string "yeti" while the data in _creatures is capitalized as "Yeti". |
Raghav Gupta | Mar 06, 2026 |
| Mobi | Page Example 9-3, Page 119 Inside sample creature object in example 9-3 |
The sample Creature object is defined with name="yeti", but the fake data layer contains "Yeti". Even with case insensitive searching, the final equality assertion (assert resp == sample) will fail because Pydantic / Python object equality is case sensitive for string fields. |
Raghav Gupta | Mar 06, 2026 |
| Other Digital Version | Example 9-3, Page 119 Inside test_get_missing function definition |
In the test_get_missing function, the assertion checks a variable named data (assert data is None). However the result of the function call was assigned to the variable resp. This results in a NameError. |
Raghav Gupta | Mar 06, 2026 |
| Printed | Page 38 Example 3-26. Return the User-Agent header (hello.py) |
`@app.post("/agent")` should be `@app.get("/agent")`. |
Zhi Li | May 17, 2024 |
| Page 52 last line |
This command doesn't work: |
Alex | Mar 02, 2025 | |
| Printed | Page 55, 56 3.24, 3.26 samples |
It should be GET instead of POST request for correct work |
Alex | Mar 03, 2025 |
| Printed | Page 57-58 bottom |
One more error in written code here: |
alex | Mar 04, 2025 |
| Page 71 Example 5-12. Start Uvicorn |
In example 5-12. "Start Uvicorn" you need to type "uvicorn web:app" instead of "uvicorn creature:app" in order to start the server (if you follow the same naming convention of the example). |
Matthias Roecklinger | Sep 20, 2024 | |
| Page 85 Example 7-5 |
The example 7-5 should be the copy of the example 3-21 but it is not. |
Hossein Tahami | Jul 08, 2024 | |
| Page 98 - 100 Example 8-1 & 8-4 |
In example 8-1 the (import uvicorn) is inside the |
Hossein Tahami | Jul 08, 2024 | |
| Page 107 Example 8-14 |
The delete path function in web/explorer.py should return |
Hossein Tahami | Jul 08, 2024 | |
| Page 117 Example 9-1 & 9-2 |
get_one function in service/creature.py returns data.get(id) but the same function in service/explorer.py returns data.get(name) |
Hossein Tahami | Jul 09, 2024 | |
| Printed | Page 170,176, example 12-5, |
Example 12-5: the function names mismatch with the explanation of the arguments such as the function name is test_summer_b() and the argument is described as test_caller_b(). And also, the names are not consistent in the example. |
Battogtokh Baasanjav | Feb 07, 2025 |