anilkyelam / mendeley-rMsync

Script to sync papers from Mendeley to reMarkable tablet
21 stars 5 forks source link

after going through the steps, I get "Incorrect padding" #1

Closed mcurti closed 2 years ago

mcurti commented 2 years ago

Traceback (most recent call last): File "sync.py", line 348, in <module> main() File "sync.py", line 246, in main session = get_session() File "sync.py", line 122, in get_session mendeley_token = json.loads(base64.b64decode(mendeley_token_b64.encode()).decode()) File "/usr/lib/python3.8/base64.py", line 87, in b64decode return binascii.a2b_base64(s) binascii.Error: Incorrect padding

this is the error I get

anilkyelam commented 2 years ago

You may have copied the token incorrectly in the .mendeley_config file. For example, I was able to repro this error by leaving out the first line of the token generated from mendeley-get-token. Make sure to copy the token all the way from (and excluding) MENDELEY_OAUTH2_TOKEN_BASE64= till the end, with no trailing spaces.

Screen Shot 2022-01-28 at 11 03 46 AM

hope that helps!

dschick commented 2 years ago

I added a = to the end of my token to solve this issue. However, I then end up with the #3 issue