Skip to content

Commit

Permalink
update get_decoded() and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomez720 committed Sep 10, 2024
1 parent 44c2dcb commit b53379b
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/go-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
paths:
- '**.go'
workflow_dispatch:
inputs:
jobs:
format:
# Check if the PR is not from a fork
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/python-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
paths:
- '**.py'
workflow_dispatch:
inputs:
jobs:
format:
# Check if the PR is not from a fork
Expand Down
2 changes: 1 addition & 1 deletion samples/convert_file/convert_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@
output_file_path = "./output.stl"
print(f"Saving output to {output_file_path}")
output_file = open(output_file_path, "wb")
output_file.write(output.get_decoded())
output_file.write(output)
output_file.close()
2 changes: 1 addition & 1 deletion tutorials/beginner_tutorial/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def convertOBJtoSTL():
output_file_path = "./dodecahedron.stl"
print(f"Saving output to {output_file_path}")
output_file = open(output_file_path, "wb")
output_file.write(output.get_decoded())
output_file.write(output)
output_file.close()
return body

Expand Down
2 changes: 1 addition & 1 deletion tutorials/conversion_obj_step/conversion_obj_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@
output_file_path = "./output.step"
print(f"Saving output to {output_file_path}")
output_file = open(output_file_path, "wb")
output_file.write(output.get_decoded())
output_file.write(output)
output_file.close()
2 changes: 1 addition & 1 deletion tutorials/conversion_obj_stl/conversion_obj_stl.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@
output_file_path = "./output.stl"
print(f"Saving output to {output_file_path}")
output_file = open(output_file_path, "wb")
output_file.write(output.get_decoded())
output_file.write(output)
output_file.close()
2 changes: 1 addition & 1 deletion tutorials/getting_started/getting_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@
output_file_path = "./output.stl"
print(f"Saving output to {output_file_path}")
output_file = open(output_file_path, "wb")
output_file.write(output.get_decoded())
output_file.write(output)
output_file.close()
2 changes: 1 addition & 1 deletion tutorials/import_file/import_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def test_ws_import():
# Break since now we know it was a success.
png_contents = message_dict["resp"]["data"]["modeling_response"][
"data"
]["contents"].get_decoded()
]["contents"]
break

# Save the contents to a file.
Expand Down
2 changes: 1 addition & 1 deletion tutorials/text-to-cad/text-to-cad.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
# Save the STEP data as text-to-cad-output.step
final_result = response.outputs["source.step"]
with open("text-to-cad-output.step", "w", encoding="utf-8") as output_file:
output_file.write(final_result.get_decoded().decode("utf-8"))
output_file.write(final_result.decode("utf-8"))
print(f"Saved output to {output_file.name}")
2 changes: 1 addition & 1 deletion tutorials/websocket_tutorial/websocketexample.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def make_cube():
):
png_contents = message_dict["resp"]["data"]["modeling_response"][
"data"
]["contents"].get_decoded()
]["contents"]
break

# Save the contents to a file.
Expand Down

0 comments on commit b53379b

Please sign in to comment.