Skip to content

Commit

Permalink
Merge pull request #2722 from gdsfactory/more_robust_updk_import
Browse files Browse the repository at this point in the history
more_robust_updk_import
  • Loading branch information
joamatab committed May 6, 2024
2 parents 339f65f + 2c4ad79 commit a588f3c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gdsfactory/read/from_updk.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ def from_updk(
script += "\n"

for block_name, block in conf.blocks.items():
parameters = block.parameters
if hasattr(block, "parameters"):
parameters = block.parameters
else:
print(f"{block_name=}, {block=} does not have parameters")
continue

parameters_string = (
", ".join(
[f"{p_name}:{p.type}={p.value}" for p_name, p in parameters.items()]
Expand Down

0 comments on commit a588f3c

Please sign in to comment.