Now solved - see reply
Cannot get the last task of this lab to validate: I keep getting the message "Please download the samples from the cloud storage URI given in lab and run the sentiment analysis on any files present in 'reviews' folder."
I have completed the tasks as follows:
Updated the Python code
Downloaded the files into the home directory
Unzipped the files
Executed the Python code against each file such as python sentiment_analysis.py reviews/bladerunner-pos.txt
Executed the Python code to an output against each file such as python sentiment_analysis.py reviews/bladerunner-pos.txt > bladerunner-pos-response.txt
And no matter what I do, it marks the task as incorrect and keeps coming back with that message: Please download the samples from the cloud storage URI given in lab and run the sentiment analysis on any files present in 'reviews' folder.!
I have done all of that! Executing the Python script gives the expected results (1 for each line of the input and then an aggregate score)
What more does it want???
This is blocking me from completing the Level 2 challenge.
I have already tried twice by ending lab and going in again, in case it was some random glitch. but get the same result.
Replying to myself as I was eventually able to solve it - but this is really silly.
My original method:
tar -xvzf sentiment-samples.tgz
Expected method (that it seems to be checking for in the history of the shell):
gunzip sentiment-samples.tgz
tar -xvf sentiment-samples.tar
I only thought to try this because that's the commands shown here: https://cloud.google.com/natural-language/docs/sentiment-tutorial
tar -xvzf is also a valid method and should be accepted, but it isn't.
Hope this helps someone else from tearing their hair out
Thanks, this solves my problem.
User | Count |
---|---|
24 | |
15 | |
4 | |
2 | |
1 |