Errors in cat-facts python code #12
Description
Description
The provided code in the template will throw an error when running the actions as the schema of the message delivered by the API (https://cat-fact.herokuapp.com/facts) seems to have changed.
This might be related with #9 however the API is currently responding (maybe the service changed?).
There are other errors in the same code, the method that picks a random fact might throw an index out of bounds error and it is fetching the length of the facts list from the parent execution context.
To Reproduce
Steps to reproduce the behavior:
Run the python code provided in the template in a suitable env (with requests module installed)
Expected behavior
The output should be 2 lines with a random cat fact and the set-output with it, for example:
The technical term for a cat’s hairball is a bezoar.
::set-output name=fact::The technical term for a cat’s hairball is a bezoar.
Additional context
I've finished the course without this problem by fixing the python code: