Update sg.py

Works on my end hope this helps