Skip to content

Commit

Permalink
[3D models][Download] Catch Easy EDA errors
Browse files Browse the repository at this point in the history
- Print an error and continue
Fixes #515
  • Loading branch information
set-soft committed Nov 7, 2023
1 parent 76f168f commit a98b461
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kibot/out_base_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ def try_download_easyeda(self, model, full_name, downloaded, sch_comp, lcsc_fiel
logger.debug('Using cached model `{}`'.format(cache_name))
return cache_name
logger.debug('- Trying to download {} component as {}/{}'.format(lcsc_id, self._tmp_dir, fname))
replace = download_easyeda_3d_model(lcsc_id, self._tmp_dir, fname)
try:
replace = download_easyeda_3d_model(lcsc_id, self._tmp_dir, fname)
except Exception as e:
logger.error(f'Error downloading 3D model for LCSC part {lcsc_id} (model: {model} problem: {e})')
replace = None
if not replace:
return None
# Successfully downloaded
Expand Down

0 comments on commit a98b461

Please sign in to comment.