From e1ccc99563df050029da67aee35f71877a9091cd Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Wed, 20 Dec 2023 12:27:39 -0300 Subject: [PATCH] [EasyEDA][Fixed] Problems with some step files - With custom encodings, not UTF-8 - Now handled as binary objects --- kibot/EasyEDA/easyeda_3d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kibot/EasyEDA/easyeda_3d.py b/kibot/EasyEDA/easyeda_3d.py index d4203f22..b38be184 100644 --- a/kibot/EasyEDA/easyeda_3d.py +++ b/kibot/EasyEDA/easyeda_3d.py @@ -77,7 +77,7 @@ class EasyedaApi: logger.warning(W_EEDA3D+"Failed to download STEP 3D model data found for EasyEDA uuid: "+uuid) step = None else: - step = r.content.decode() + step = r.content return obj, step @@ -340,7 +340,7 @@ class Exporter3dModelKicad: else: name_step = os.path.splitext(name_step)[0]+'.step' name_step = os.path.join(lib_path, name_step) - with open(name_step, "w", encoding="utf-8") as my_lib: + with open(name_step, "wb") as my_lib: my_lib.write(self.output_step) return name_wrl or name_step