Did the example say why it was doing it that way? Be careful with following examples blindly.

A path with spaces works if you escape the space or surround the path with quotes. To be clear, I didn't test uploading a video, I just wrote some sample code with argparse that's similar to yours and tested reading a fake client_secrets file using unicode type and default type.