May-08-2020, 01:59 PM
Hi there,
So I'm pretty new to Python coding, I have old code here that isn't very robust when it comes to extreme user inputs. I'm trying to fix that.
The first button on my GUI loads in a file, and opens a directory to allow the user to select which file they want. When I click cancel or 'x' the directory, my program crashes.
I've had a search online and I'm not sure whether I'm not searching the right terminology, but I can't seem to find anything that fixes this. This should be fairly straightforward.
Could someone point me in the right direction?
I basically want a workaround that allows the program to take 'cancelling' or 'x'ing the directory as a reasonable input without crashing.
Thanks in advance.
So I'm pretty new to Python coding, I have old code here that isn't very robust when it comes to extreme user inputs. I'm trying to fix that.
The first button on my GUI loads in a file, and opens a directory to allow the user to select which file they want. When I click cancel or 'x' the directory, my program crashes.
I've had a search online and I'm not sure whether I'm not searching the right terminology, but I can't seem to find anything that fixes this. This should be fairly straightforward.
Could someone point me in the right direction?
I basically want a workaround that allows the program to take 'cancelling' or 'x'ing the directory as a reasonable input without crashing.
Thanks in advance.