Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maxLength < 5 fails to generate a word. #82

Open
askarkg12 opened this issue Jun 24, 2022 · 0 comments
Open

maxLength < 5 fails to generate a word. #82

askarkg12 opened this issue Jun 24, 2022 · 0 comments

Comments

@askarkg12
Copy link

When trying to generate small words with length 4 or less, generator fails to do so. The program retries 3 times, but throws an exception after that.
I understand that it is because Wordnik responds with code 0, is there anything that can be done to give wordnik extra time to find the word?

To Reproduce

import random_word
r = random_word.RandomWords()
print(r.get_random_word(maxLength=4)

Expected behavior
return a word with specified number of characters

Environment (please complete the following information):

  • OS: [Ubuntu]
  • Python [3.10]
  • random-word [ 1.0.7]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant