Closed Ragingthunder567 closed 3 years ago
Having the same issue. Is it possible that we are making too many HTTP requests and there is an unknown rate limiting that we don't know of?
Same issue here:
Exception: Error occured, No result found. If you think this was a mistake than raise issue at https://github.com/vaibhavsingh97/random-word/issues
I am receiving the same issue:
File "x/x/x/env/lib/python3.7/site-packages/random_word/random_word.py", line 60, in get_random_word
"Error occured, No result found. If you think this was a mistake than raise issue at {}".format(self.issue_url))
Exception: Error occured, No result found. If you think this was a mistake than raise issue at https://github.com/vaibhavsingh97/random-word/issues
Using the following:
random_word = r.get_random_word(hasDictionaryDef="true", includePartOfSpeech="noun,verb", minCorpusCount=1, maxCorpusCount=10, minDictionaryCount=1, maxDictionaryCount=10, minLength=5, maxLength=10)
Same Issue for me as well. Using a quick isolated script to test it out
The Script:
#!/usr/bin/env python3
def word():
from random_word import RandomWords
r = RandomWords()
word = r.get_random_word(hasDictionaryDef="true")
return word
def main():
print(word())
if __name__ == "__main__":
main()
The Result:
Traceback (most recent call last):
File "./randomword", line 13, in <module>
main()
File "./randomword", line 10, in main
print(word())
File "./randomword", line 6, in word
word = r.get_random_word(hasDictionaryDef="true")
File "/usr/local/lib/python3.7/site-packages/random_word/random_word.py", line 60, in get_random_word
"Error occured, No result found. If you think this was a mistake than raise issue at {}".format(self.issue_url))
Exception: Error occured, No result found. If you think this was a mistake than raise issue at https://github.com/vaibhavsingh97/random-word/issues
Same thing is happening to me. I tried to put time.sleep(2)
in between the lines, but it didn't fix it.
I get the same thing too. My current solution is close it down and come back later.
~I just got this error, though it doesn't seem to be persistent. I've resorted to using this function.~
def make_random_word(self):
words = RandomWords()
word = None
while not word:
try:
word = words.get_random_word()
except:
pass
return word
EDIT: Yeah, didn't test this before posting. It's still just doesn't work. Right now my script is just hanging as it loops over indefinitely
Same issue here.
Exception: Error occured, No result found. If you think this was a mistake than raise issue at https://github.com/vaibhavsingh97/random-word/issues
I had released a new version on PyPI (https://pypi.org/project/Random-Word/1.0.6/), this will fix recent issues.
Description Error while using the module with random - word failing to generate a word
To Reproduce from random_word import RandomWords import time
r = RandomWords()
def word_array(primo): word_arr = [] for x in range (len(primo)): word_arr.append(primo[x])
def gap(): print("") print("")
print("Welcome to Hangman!") time.sleep(0.5) print("Ready to play?") gap() time.sleep(1) word = r.get_random_word(minLength = 4, maxLength = 8, hasDictionaryDef = "true") print(word)
Expected behavior Expected to get a word.
Environment (please complete the following information):