vaibhavsingh97 / random-word

This is a simple python package to generate random english words
https://pypi.org/project/random-word/
MIT License
123 stars 25 forks source link

get_random_words() returns error every time. #41

Closed edubu2 closed 3 years ago

edubu2 commented 3 years ago

Describe the bug Keep getting unexpected Exception "Error occured, No result found...."

To Reproduce Steps to reproduce the behavior: ``

from random_word import RandomWords r = RandomWords() r.get_random_words()

Traceback (most recent call last): File "", line 1, in File "/Users/ewilens/anaconda3/lib/python3.8/site-packages/random_word/random_word.py", line 111, in get_random_words raise Exception( Exception: Error occured, No result found. If you think this was a mistake than raise issue at https://github.com/vaibhavsingh97/random-word/issues ``

Expected behavior I expected a list of random words to be printed to stdout

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

MaximilianKlein92 commented 3 years ago

I have the same Issue!

chikko80 commented 3 years ago

same issue here!

guisuzuki-ene commented 3 years ago

same here

DoronGanel commented 3 years ago

same issue

qduff commented 3 years ago

Same here

flextian commented 3 years ago

This is because this library uses the Wordnik API with one common API key, and the API rate limit is being exceeded. To generate the words reliably you would need to get your own API key and edit the config.py file as stated in the readme:

Add API Key in random_word directory defining API Key in config.py. If you don't have an API key than request your API key here

API_KEY = "<API KEY>"

After that, install your package locally

$ pip install -e .

Right now there doesn't seem to be an easier way to specify your own API key for this library.

yvesyil commented 3 years ago

same here

vaibhavsingh97 commented 3 years ago

I had released a new version on PyPI (https://pypi.org/project/Random-Word/1.0.6/), this will fix recent issues.