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_word() function bug #32

Closed Puhalenthi closed 3 years ago

Puhalenthi commented 4 years ago

The get_random_word() function is outputting the message: """Exception: Error occurred, No result found. If you think this was a mistake than raise issue at https://github.com/vaibhavsingh97/random-word/issues" It is not letting me create a random word. After multiple times of using the functions, it is printing errors

I was expecting it to return a random word without any errors.

OS- Windows 10 Python 3.8

jackprogramsjp commented 4 years ago

This is happening to me too.

bdpedigo commented 4 years ago

Same here

JoelLefkowitz commented 4 years ago

The Api is rejecting requests with the current key. Response: <Response [429]> Result: {'message': 'API rate limit exceeded'}

33 Should make issues like this easier to rectify once merged.

pugs2424 commented 4 years ago

ya recently I haven't been able to generate any words

jackprogramsjp commented 4 years ago

Guys, forget about this. The owner of random-word didn't update this for like 2 years. Just use https://raw.githubusercontent.com/sindresorhus/mnemonic-words/master/words.json to get random word.

import json
import random
import urllib.request

url = urllib.request.urlopen("https://raw.githubusercontent.com/sindresorhus/mnemonic-words/master/words.json")
words = json.loads(url.read())
random_word = random.choice(words)
Puhalenthi commented 4 years ago

Thanks for the help!

patrickbelding commented 4 years ago

working in 2020

import json
import random
import requests

response = requests.get("http://raw.githubusercontent.com/sindresorhus/mnemonic-words/master/words.json")
data = response.json()
random_word = random.choice(data)
print(random_word)
retr0foxx commented 4 years ago

same

juan-solorio-program commented 4 years ago

Same here. The strange thing is that it worked fine a couple of days ago, but today it just stopped working at all:

Exception: Error occured, No result found. If you think this was a mistake than raise issue at https://github.com/vaibhavsingh97/random-word/issues

vaibhavsingh97 commented 3 years ago

Thanks for reporting will update the package today, duplicate of https://github.com/vaibhavsingh97/random-word/issues/44