Skip to content

Commit 26ea97a

Browse files
committed
chapter 11: Getting our image onto the server: error
This commit reports an error I saw after executing command $ ansible-playbook --user=<my user> -i <my-server>, \ infra/ansible-provision.yaml -vv from section 'Getting our image onto the server'. I could have made a mistake to cause this; there may be no issue with the instructions in the text. environment: $ python3 --version Python 3.12.2 $ ansible --version ansible [core 2.16.6] I may presume too much by adopting the convention of other contributors and putting comments in the text to describe the issue. But it was a tidy way to point to where I encountered the error.
1 parent 62c8c28 commit 26ea97a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

chapter_11_ansible.asciidoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,13 @@ false, "AttachStdout": true, "Cmd": ["gunicorn", "--bind", ":8888",
690690
// check their user has permission.
691691
// DAVID: by the way it's getting annoying having to type my sudo password in all the time.
692692

693+
// ZIPPERER: I got error
694+
// TASK [Export container image locally]
695+
// ... ModuleNotFoundError: No module named 'requests'
696+
// "Failed to import the required Python library (requests) on <local hostname>'s Python ../.venv/bin/python3.
697+
//
698+
// No error after I installed library `requests` in venv (i.e. `python3 -m pip install requests`) and reran the `ansible-playbook` command.
699+
693700
For completeness, let's also add a step to explicitly build the image locally.
694701
This means we don't have a dependency on having run `docker build` locally.
695702

0 commit comments

Comments
 (0)