Update gui.py

Fix keyerror in gui