Skip to content

Commit 7cf86b8

Browse files
Bugfix to support python 3.11
1 parent 0a1d45f commit 7cf86b8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

yepcode_run/api/yepcode_api.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,10 @@ def _get_access_token(self) -> str:
162162
"AccessToken has expired. Provide a new one or enable automatic refreshing by providing an apiToken or clientId and clientSecret."
163163
)
164164
try:
165+
credentials = f"{self.client_id}:{self.client_secret}"
165166
api_token = (
166167
self.api_token
167-
or f"sk-{base64.b64encode(
168-
f"{self.client_id}:{self.client_secret}".encode()
169-
).decode()}"
168+
or f"sk-{base64.b64encode(credentials.encode()).decode()}"
170169
)
171170

172171
response = requests.post(

0 commit comments

Comments
 (0)