Skip to content

Commit bf1631b

Browse files
committed
fixed the export report function
1 parent 0ccf45a commit bf1631b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sempy_labs/report/_export_report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def export_report(
6060
raise FabricHTTPException(response)
6161

6262
# Save file to the attached lakehouse
63-
with open(f"/lakehouse/default/Files/{file_name}.pbix", "w") as file:
64-
file.write(response.text)
63+
with open(f"/lakehouse/default/Files/{file_name}.pbix", "wb") as file:
64+
file.write(response.content)
6565

6666
print(
6767
f"{icons.green_dot} The '{report}' report within the '{workspace}' workspace has been exported to the attached lakehouse as the '{file_name}' file."

0 commit comments

Comments
 (0)