Sign Up

Sign In

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Sorry, you do not have a permission to ask a question, You must login to ask question.

Discy Latest Questions

  • 2
  • 2

I need to convert image (or any file) to base64 string. I use different ways, but result is always byte, not string. Example: import base64 file = open('test.png', 'rb') file_content = file.read() base64_one = base64.encodestring(file_content) base64_two = base64.b64encode(file_content) print(type(base64_one)) print(type(base64_two)) Returned <class 'bytes'> <class 'bytes'> How do I get ...

  • 8
  • 8

I have a base64 encrypt code, and I can’t decode in python3.5 import base64 code = "YWRtaW46MjAyY2I5NjJhYzU5MDc1Yjk2NGIwNzE1MmQyMzRiNzA" # Unencrypt is 202cb962ac59075b964b07152d234b70 base64.b64decode(code) Result: binascii.Error: Incorrect padding But same website(base64decode) can decode it, Please anybody can tell me why, and how to use ...

  • 7
  • 7

I have a problem about converting a base64 encoded string into binary. I am collecting the Fingerprint2D in the following link, url = "https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/108770/property/Fingerprint2D/xml" Fingerprint2D=AAADccB6OAAAAAAAAAAAAAAAAAAAAAAAAAA8WIEAAAAAAACxAAAAHgAACAAADAzBmAQwzoMABgCI AiTSSACCCAAhIAAAiAEMTMgMJibMsZuGeijn4BnI+YeQ0OMOKAACAgAKAABQAAQEABQAAAAAAAAA AA== The descriptiong in the Pubchem says that this is 115 byte string, and it ...

close