MineMind, that's python2 and a lot of code for me right now. But i'll start digging.
dflatline, just for readability. I know it looks odd but it's not the same encoding/decoding When you paste the key from GOX it comes in as a string, so initially GOX_secret.encode() changes a string into a bytes, and then base64.b64decode changes those bytes to base64 for GOX's API. I guess those two lines could be replaced by GOX_secret = base64.b64decode(("your secret here".encode()))