Skip to content

Commit af89e19

Browse files
lBilaliLulzim Bilali
andauthored
fix create_notebook (#877)
provided notebook_content should be a string on import_notebook_from_web the content was provided as bytearray instad Co-authored-by: Lulzim Bilali <[email protected]>
1 parent 74fc580 commit af89e19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sempy_labs/_notebooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def import_notebook_from_web(
163163
if len(dfI_filt) == 0:
164164
create_notebook(
165165
name=notebook_name,
166-
notebook_content=response.content,
166+
notebook_content=response.content.decode('utf-8'),
167167
workspace=workspace_id,
168168
description=description,
169169
format="ipynb",
@@ -216,7 +216,7 @@ def create_notebook(
216216
Defaults to None which places the notebook in the root of the workspace.
217217
"""
218218

219-
notebook_payload = base64.b64encode(notebook_content).decode("utf-8")
219+
notebook_payload = base64.b64encode(notebook_content.encode('utf-8')).decode("utf-8")
220220

221221
definition_payload = {
222222
"parts": [

0 commit comments

Comments
 (0)