need to debug keyerrors in main.py