Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OverflowError using get_GDSII_prisms #1650

Closed
ghost opened this issue Jun 30, 2021 · 1 comment · Fixed by #1652
Closed

OverflowError using get_GDSII_prisms #1650

ghost opened this issue Jun 30, 2021 · 1 comment · Fixed by #1652
Labels

Comments

@ghost
Copy link

ghost commented Jun 30, 2021

Hi,

I have made a recent post about an error I was getting after running mp.get_GDSII_prisms. To summarize, I took this script (which works fine) and just tried to add a user-defined function in order to make the index of the coupler vary. As suggested in my previous post, I tested with a simple function :

def test_material_function(p): return mp.Medium(index=2)

And this is how I called mp.get_GDSII_prisms :

upper_branch = mp.get_GDSII_prisms(test_material_function, gdsII_file, UPPER_BRANCH_LAYER, si_zmin, si_zmax)

This is the only change I made in the script. But it gives me this error :
OverflowError: in method 'get_GDSII_prisms', argument 3 of type 'int'

I don't really understand what it means. Why is this an OverflowError, and why it is on argument 3 when I changed argument 1. I looked for this kind of error on the internet but I didn't find anything. Someone mentioned that this could be due to Python3, but I tried on Python2 and it didn't change anything. I just noticed that when I gave an argument to test_material_function, the error disappear (but then, I don't have the argument of position anymore).

Has anyone had a similar error ? If so, is there another way to import the geometry from a GDS file, and modify its index ?

Thank you for your help!

@stevengj
Copy link
Collaborator

stevengj commented Jul 1, 2021

Thanks for the report. This is a bug, and should be fixed by #1652.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant