atlassian-api / atlassian-python-api

Atlassian Python REST API wrapper
https://atlassian-python-api.readthedocs.io
Apache License 2.0
1.29k stars 642 forks source link

[Bitbucket] Unable to decode the base64 output #1350

Open sheshcode opened 3 months ago

sheshcode commented 3 months ago

Hi,

I am reading yaml file using bitbucket.get_content_of_file() and it works fine. But when I try base64.decode, it keeps throwing "Incorrect Padding".

I have checked and the total number of characters are multiple of 4 and there are no invalid Base64 characters. When I try to convert the file through some online tool, it gives the content in original yaml.

I can yaml.load() the content but that builds a dictionary instead of yaml, so no go.

Does the get_content_of_file() adds extra characters? Can the get_content_of_file() return data in the format it reads?

Any suggestions regarding solution are very welcome. Thanks.

Regards, Shesh