cancel
Showing results for 
Search instead for 
Did you mean: 
TiffanyA
Flight Engineer
Flight Engineer
  • 3,260 Views

RH294 Chapter 7 Lesson 4

Jump to solution

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:

Screen Shot 08-10-20 at 02.41 PM.PNG

However, when I attempt the same command, I receive the below output error:

Screen Shot 08-10-20 at 02.39 PM.PNG

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? 

 

"Success doesn't come from what you do occasionally, it comes from what you do consistently." ~Maria Forleo
Labels (3)
0 Kudos
1 Solution

Accepted Solutions
TiffanyA
Flight Engineer
Flight Engineer
  • 3,230 Views

I found the problem. I mistakenly thought the uppercase -O was a lowercase -o in the directions in step 3 below:

Screen Shot 08-11-20 at 09.58 AM_LI.jpg

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 !

"Success doesn't come from what you do occasionally, it comes from what you do consistently." ~Maria Forleo

View solution in original post

5 Replies
JS_Learning
Moderator
Moderator
  • 3,242 Views

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,

 

0 Kudos
TiffanyA
Flight Engineer
Flight Engineer
  • 3,233 Views

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.

"Success doesn't come from what you do occasionally, it comes from what you do consistently." ~Maria Forleo
0 Kudos
TiffanyA
Flight Engineer
Flight Engineer
  • 3,231 Views

I found the problem. I mistakenly thought the uppercase -O was a lowercase -o in the directions in step 3 below:

Screen Shot 08-11-20 at 09.58 AM_LI.jpg

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 !

"Success doesn't come from what you do occasionally, it comes from what you do consistently." ~Maria Forleo
JS_Learning
Moderator
Moderator
  • 3,225 Views

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.

 

TiffanyA
Flight Engineer
Flight Engineer
  • 3,219 Views

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! :)

"Success doesn't come from what you do occasionally, it comes from what you do consistently." ~Maria Forleo
0 Kudos
Join the discussion
You must log in to join this conversation.