From 037244113322a4d7103038fc9bfa8aa97dcb2bc8 Mon Sep 17 00:00:00 2001 From: Vishal Dhayagude Date: Thu, 1 Apr 2021 17:13:02 +0530 Subject: [PATCH] fix: minor encoding issue fixed --- frappeclient/frappeclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappeclient/frappeclient.py b/frappeclient/frappeclient.py index f368515..445edc5 100644 --- a/frappeclient/frappeclient.py +++ b/frappeclient/frappeclient.py @@ -62,7 +62,7 @@ def login(self, username, password): raise AuthError def authenticate(self, api_key, api_secret): - token = b64encode('{}:{}'.format(api_key, api_secret)) + token = b64encode('{}:{}'.format(api_key, api_secret).encode("utf-8")).decode("utf-8") auth_header = {'Authorization': 'Basic {}'.format(token)} self.session.headers.update(auth_header)