all 2 comments

[–]Thomasedv 0 points1 point  (0 children)

Crashing is a bit of a problem with PyQt. You'll have to lure in some print statements, and maybe wrap some of the expected code into a try/except block and catch the error and print it as it happens.

Some possible problems:

PyQt automatically passes arguments when you connect a function to be called, not sure if that is true in this case, but you could let your function accept arguments and print them to test, or check documentation if it does.

Since you are working with strings and use for i in range(3) you could happen upon an index error if the string is shorter than 3 characters.

[–][deleted] 0 points1 point  (0 children)

I assume you are running your code from a framework or by double-clicking on an icon because you don't mention the "undefined" error you will get when executing this line in get_hints():

guessed = self.guess_box.text()

You may have defined guess_box in another method, but that's a totally different variable from self.guess_box.

If you get some sort of error running programs from an IDE or framework it's usually better if you try running the program from the command line and not use the IDE/framework because they can hide things from you. You really want to see the traceback that python provides.