benjhar / JokeAPI-Python

An API Wrapper for Sv443's JokeAPI
GNU General Public License v3.0
33 stars 9 forks source link

Example in readme doesn't work #5

Closed ThatCopy closed 4 years ago

ThatCopy commented 4 years ago

Describe the bug The example in the README.md doesn't work and throws an error

To Reproduce Run the example in README.md

Expected behavior Return a joke

Error and/or code snippet

Traceback (most recent call last): File "main.py", line 5, in <module> if joke["type"] == "single": # Print the joke TypeError: list indices must be integers or slices, not str

Please complete the following information:

benjhar commented 4 years ago

Thanks for opening this issue, it's fixed in the most recent commit.