I'm not sure if this a human error on my part or if this is an error in the gilmore online book, but in chapter 7, lesson 4, step 7 the book shows the following output I should receive with the --list command:
However, when I attempt the same command, I receive the below output error:
I don't understand why I'm receving this error, especially since the exercise doesn't even require making any changes inside the inventorya.py file, therefore there shouldn't be an error in the file. Is there a syntax typo in the book that I'm not aware of, or am I simply overlooking an user error?
I found the problem. I mistakenly thought the uppercase -O was a lowercase -o in the directions in step 3 below:
From what I gather from the wget man page, the uppercase -O is used to keep the file name that you are saving the download to, and the lowercase -o is used for logging purposes....feel free to correct me if my understand isn't correct.
It was an user error after all ;) Thanks for your help @JS_Learning !
Hi there,
I did the RH294 training too, I did not encounter that issue.
I think it looks more like an environment related issue, as if materials.example.com is not reachable.
1) Can you check if that is the case? Maybe ping that materials.example.com from the server you are running the exercice (should be workstation). Also check your lab environment, it should be started server.
2) Sometimes the script errors are not very clear. Are you sure you properly chmod +x of the inventory/inventorya.py script? (I think they said chmod 755 in the exercice, which is ok).
Cheers,
Thanks for the reply. I'm working in the lab now and tried your ping suggestion. The ping was successful so the connection is there. Foundation 0 is powered on. Last time I double checked chmod and it was correct (755). I'm going to try another run through and see if I get the same error and come back with an update.
I found the problem. I mistakenly thought the uppercase -O was a lowercase -o in the directions in step 3 below:
From what I gather from the wget man page, the uppercase -O is used to keep the file name that you are saving the download to, and the lowercase -o is used for logging purposes....feel free to correct me if my understand isn't correct.
It was an user error after all ;) Thanks for your help @JS_Learning !
Well done for finding the root cause!
Yes it seems like this:
-o ‘--output-file=logfile
-O ‘--output-document=file’
What you are asked to do with -O (uppercase) is redirect the file obtained using wget to another file. It's basically like "downloading the file and saving it as a file called inventorya.py (under the directory called inventory)".
The option with -o appears to be logging the result of the wget command into a log file.
Source: wget man page
So your python script was not actually containing proper code but some sort of logging information, hence the strange errors.
Thanks for the breakdown. I love how IT keeps me in a constant state of learning; its just a full of teachable moments, even if the moment comes from figuring out my own mistakes! :)
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.