It looks like you're new here. If you want to get involved, click one of these buttons!
Dear Matthias,
This is to inform you that I found a problem with version 0.28.14 and 0.28.15
"typeerror: ambiguous overload variants - multiple method declarations match arguments in polygon.init"
The problem doe not appear up to version 0.28.13
This error appears with a python script that I am using almost every day and never had problem before.
I went back to 0.28.13 and the problem is not there.
I am using ubuntu 22.04_LTS
Please let me know in case you need the source scripts
Thank you for your great work.
Best regards
Giovanni
Comments
@Giovanni I need more information about this. The message says, that you are giving some parameters to the Polygon constructors that are not exactly matching one version of the initializer, but there is a choice and there are multiple candidates.
I suspect you see the problem because of this enhancement: https://github.com/KLayout/klayout/issues/1530
You need to tell me what are the parameters to pass to the Polygon constructor. It accepts a list of
Point
objects, aSimplePolygon
object are aBox
object. There is no change to the behavior of these flavors. Other ways may or may not work.The error message should also contain more information about the variants that are available.
Matthias
Dear Matthias,
I looked at the enhancement you mentioned and I think it is related to it.
To facilitate your work, I have prepared a testcase for you.
Please find here the script and the gds to reproduce the problem.
The script:
https://drive.google.com/file/d/1sO5oNAqlXLxac-3MGeqtQaLjaiaxCXh7/view?usp=sharing
The gds:
https://drive.google.com/file/d/1ln_YzWtUuOy-GwP07p3gqoHjgrKDcZaf/view?usp=sharing
Please let me kno win case you are not able to access the files
Thank you in advance
Best regards
Giovanni
Thanks, that is easy ...
Please see this line in "create_char":
You are using the
DPoint
object to create aPolygon
object. BasicallyPolygon
(integer-unit polygon) is made fromPoint
(integer-unit as well) whileDPoint
(micrometer-unit point, by convention) goes intoDPolygon
(micrometer-unit polygon).So far,
DPoint
was implicitly converted toPoint
which appears not to be working anymore (I can't reproduce that for me, but maybe there is a dependency on the Python version). Anyway, this is bad style anyway, so you should simply replacepya.DPoint
bypya.Point
and things should work again.Matthias
THANK YOU Matthias.
I changed the pya.DPoint to pya.Point and now it works perfectly.
Thank you again
Giovanni