Gui error when selecting big dictionary file

when i use the gui with english words full.txt it will select a random word but say in the console that k = 1 and i can only enter the first letter for my guess
if the selected word then starts with an s and i input an s it will tell my ive won

You can take a look at english_words_full.txt:
It is a complete file that you can either use to generate new dictionaries externally or if you make your program robust enough to cope with words of different lengths in the dictionary file.

The GUI takes another approach than the console application regarding k in that it does not ask the user to provide the length.
Instead, the GUI probes the first word of the dictionary to determine the length k and then forwards this information to your wordle implementation.

Therefore, your implementation probably only takes the first letter of each line.
Afterward, it might choose the random word s or (depending on your implementation) a full word starting with s like the word 302449 stairway.
By specification of wordle, the behavior to win is correct if the first and only letter matches the guess.

am i correct if i assume that gernatedict should only insert words of length k into the dictionary it creates?

To quote the project description:

It returns a trie containing all words from the dictionary. Each line in the provided file contains exactly one word. […] You may assume that you only encounter words of length exactly k.

Therefore, it is student-friendly in that you do not have to worry about the other case as it will not be tested.

Depending on how robust your code is, it probably should not matter if you insert more words.
Alternatively, it would from a wordle point of view also be expected behavior to ignore words of length \neq k.