From b53379b9a01ba700714a1c4b7bd48716c507f2ca Mon Sep 17 00:00:00 2001 From: jgomez720 <114548659+jgomez720@users.noreply.github.com> Date: Tue, 10 Sep 2024 15:54:14 -0700 Subject: [PATCH] update get_decoded() and workflows --- .github/workflows/go-format.yml | 1 - .github/workflows/python-format.yml | 1 - samples/convert_file/convert_file.py | 2 +- tutorials/beginner_tutorial/convert.py | 2 +- tutorials/conversion_obj_step/conversion_obj_step.py | 2 +- tutorials/conversion_obj_stl/conversion_obj_stl.py | 2 +- tutorials/getting_started/getting_started.py | 2 +- tutorials/import_file/import_model.py | 2 +- tutorials/text-to-cad/text-to-cad.py | 2 +- tutorials/websocket_tutorial/websocketexample.py | 2 +- 10 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/go-format.yml b/.github/workflows/go-format.yml index 5b1d3ab..49ea19f 100644 --- a/.github/workflows/go-format.yml +++ b/.github/workflows/go-format.yml @@ -12,7 +12,6 @@ on: paths: - '**.go' workflow_dispatch: - inputs: jobs: format: # Check if the PR is not from a fork diff --git a/.github/workflows/python-format.yml b/.github/workflows/python-format.yml index 0cc8d0f..2fef957 100644 --- a/.github/workflows/python-format.yml +++ b/.github/workflows/python-format.yml @@ -12,7 +12,6 @@ on: paths: - '**.py' workflow_dispatch: - inputs: jobs: format: # Check if the PR is not from a fork diff --git a/samples/convert_file/convert_file.py b/samples/convert_file/convert_file.py index 6c5c212..e514b6d 100755 --- a/samples/convert_file/convert_file.py +++ b/samples/convert_file/convert_file.py @@ -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() diff --git a/tutorials/beginner_tutorial/convert.py b/tutorials/beginner_tutorial/convert.py index 01ceeed..fd792f0 100644 --- a/tutorials/beginner_tutorial/convert.py +++ b/tutorials/beginner_tutorial/convert.py @@ -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 diff --git a/tutorials/conversion_obj_step/conversion_obj_step.py b/tutorials/conversion_obj_step/conversion_obj_step.py index fe16621..99afdd3 100755 --- a/tutorials/conversion_obj_step/conversion_obj_step.py +++ b/tutorials/conversion_obj_step/conversion_obj_step.py @@ -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() diff --git a/tutorials/conversion_obj_stl/conversion_obj_stl.py b/tutorials/conversion_obj_stl/conversion_obj_stl.py index 87cd167..812243a 100755 --- a/tutorials/conversion_obj_stl/conversion_obj_stl.py +++ b/tutorials/conversion_obj_stl/conversion_obj_stl.py @@ -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() diff --git a/tutorials/getting_started/getting_started.py b/tutorials/getting_started/getting_started.py index d3a2fcc..5c786c9 100755 --- a/tutorials/getting_started/getting_started.py +++ b/tutorials/getting_started/getting_started.py @@ -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() diff --git a/tutorials/import_file/import_model.py b/tutorials/import_file/import_model.py index 84d0025..ba7a179 100644 --- a/tutorials/import_file/import_model.py +++ b/tutorials/import_file/import_model.py @@ -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. diff --git a/tutorials/text-to-cad/text-to-cad.py b/tutorials/text-to-cad/text-to-cad.py index de83024..fef3392 100644 --- a/tutorials/text-to-cad/text-to-cad.py +++ b/tutorials/text-to-cad/text-to-cad.py @@ -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}") diff --git a/tutorials/websocket_tutorial/websocketexample.py b/tutorials/websocket_tutorial/websocketexample.py index 51ddb95..40da9c4 100644 --- a/tutorials/websocket_tutorial/websocketexample.py +++ b/tutorials/websocket_tutorial/websocketexample.py @@ -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.