Sudo ./letsencrypt-auto --debug fails

Not sure if this was the same reason, but on my instance I was getting the same error.
I had to update python to 2.7 It was 2.6 before.

I followed the step here to update

sudo ./letsencrypt-auto --certonly

Worked afterwards.