Skip to content

Commit

Permalink
[EasyEDA][Fixed] Problems with some step files
Browse files Browse the repository at this point in the history
- With custom encodings, not UTF-8
- Now handled as binary objects
  • Loading branch information
set-soft committed Dec 20, 2023
1 parent 454557a commit e1ccc99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kibot/EasyEDA/easyeda_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_raw_3d_model_obj(self, uuid):
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


Expand Down Expand Up @@ -340,7 +340,7 @@ def export(self, lib_path, fname=None):
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

Expand Down

0 comments on commit e1ccc99

Please sign in to comment.