jonadsimon / wonder-words-generator

Generates WonderWords puzzles
Apache License 2.0
2 stars 0 forks source link

"parent" breaks json parsing #77

Open jonadsimon opened 2 years ago

jonadsimon commented 2 years ago

When giving seed word "parent" the following error occurs. Need to add some kind of extra checks

Traceback (most recent call last):
  File "/Users/jonsimon/Code/wonder-words-generator/make_puzzle_v2.py", line 494, in <module>
    make_puzzle(args.topic, args.board_size, args.packing_constant, args.strategy, args.pivot, args.optimize_words, args.relatedness_cutoff, args.max_retries, args.timeout)
  File "/Users/jonsimon/Code/wonder-words-generator/make_puzzle_v2.py", line 339, in make_puzzle
    word_tuples, hidden_word_tuple_dict = get_related_words(topic, relatedness_cutoff)
  File "/Users/jonsimon/Code/wonder-words-generator/semantic_neighbors.py", line 129, in get_related_words
    if term["score"] > score_cutoff and i < neighbors_cutoff:
TypeError: '>' not supported between instances of 'NoneType' and 'float'