Open thanojo opened 3 months ago
Hi Yannick, Tyler or Momchil,
Can you guys help with this?
@yaugenst @momchil-flex @tylerflex
From the error message it looks like a Section is getting passed an int
somewhere instead of a LayerSpec
(tuple[int, int] | str
).
Seems like a gdsfactory internal issue to me / not a tidy3d bug.
Okay, thanks for the update. If you want to, I can try to get to the bottom of this in terms of gdsfactory, and if I find something, then close this issue and create the corresponding issue in https://github.com/gdsfactory/gdsfactory/issues . But I feel like this may be fixed 'automatically' through the continuing improvements on gdsfactory8
Describe the bug
Even when the resulting components are pretty much identical, the
Tidy3DComponent
does not plot the simulation geometry and instead crashes when using aLayer
tuple as thelayer
argument in a cross section function. The bug is not present when using astr
to access the layer from the activated generic PDK, though I am also struggling with this when defining own PDKs (actually, this is where this becomes really weird and messy but it would be too much to include here).To Reproduce
Depending on which MMI or cross section is used, the simulation geometry is successfully plotted (
MMIPASS
orMMIPASS_PDK
) or python crashes. The error message is the following:error_message.txt
Expected behavior
The simulation geometry should be plotted (and any ensuing simulation steps should work).
Suggested fix
I am not sure what is causing the error, but will post a workaround if I find one. This could just be the
tidy3d
plugin, but it could also go deep into thegdsfactory.technology
. The weirdest part is that when defining own PDKs and importing them from elsewhere (as opposed to the above), this behaviour becomes seemingly non-deterministic, sometimes passing and sometimes not in subsequent executions.Versions
requirements.txt