Skip to content

Instantly share code, notes, and snippets.

@jd
Created January 29, 2014 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jd/8697880 to your computer and use it in GitHub Desktop.
Save jd/8697880 to your computer and use it in GitHub Desktop.
Python 2.7.6 (default, Dec 9 2013, 18:09:21)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> base64.b64decode('lol')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/base64.py", line 76, in b64decode
raise TypeError(msg)
TypeError: Incorrect padding
Python 3.3.3 (default, Dec 9 2013, 18:03:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> base64.b64decode('lol')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python3/3.3.3/Frameworks/Python.framework/Versions/3.3/lib/python3.3/base64.py", line 91, in b64decode
return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment