You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
When using new_cell with the option overwrite_duplicate = True and use_current_library = True
an ValueError [GDSPY] Cell named xxx already present in library occurs.
I'm not sure if it is caused by improper usage, I do multiple calls of gdspy.current_library.new_cell(name="testDupl", overwrite_duplicate=True).
I think this is caused because inside new_cell function the first operation is to instantiate a new cell:
It's a bug. When using current_library, calling new_cell on it is not the expected use case (since just creating a cell from the constructor achieves the same goal and seems simpler). The problem is that your solution won't work if new_cell is called from another library, because self != gdspy.currentl_library.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using
new_cell
with the optionoverwrite_duplicate = True
anduse_current_library = True
an ValueError [GDSPY] Cell named xxx already present in library occurs.
I'm not sure if it is caused by improper usage, I do multiple calls of
gdspy.current_library.new_cell(name="testDupl", overwrite_duplicate=True)
.I think this is caused because inside new_cell function the first operation is to instantiate a new cell:
gdspy/gdspy/library.py
Lines 2299 to 2328 in 5234778
But inside the initializer of the new cell class the overwrite_duplicate is not passed to the current_library.add function.
gdspy/gdspy/library.py
Lines 104 to 115 in 5234778
My workaround to fix this was a modifcation the new_cell function as follows:
Is this a bug or wrong usage?
The text was updated successfully, but these errors were encountered: