Error in Linux but works in Windows! Error: No overload with matching arguments in CellInstArray.new

Hello,
This code works on windows but when we try it in a Linux environment on a different computer we get the following error:

*** ERROR: No overload with matching arguments in CellInstArray.new

In order to call this script we use the following linux command:

r mark_array.py -rd csv_path=mark_array1.tsv -rd oas_path=mark_array1.oas -rd config_path=. -rd output_folder=.

We read data from csv (for windows) or tsv (for linux) files.

The python code is the following:

        for n in range(0,N_x):
            for m in range(0,N_y):
                instance_offset_x=float(mark['OffsetX'])/dbu
                instance_offset_y=float(mark['OffsetY'])/dbu
                trans=pya.ICplxTrans.new(float(mark['scaling']), float(mark['rotation']), False, instance_offset_x+n*px, instance_offset_y+m*py)

                Instance_cell_index=cells_with_index[mark['reference']]
                subInst = pya.CellInstArray(Instance_cell_index, trans)  #first arg is the cell index of child
                parent_cell.insert(subInst)

mark and cells_with_index are just some dictionaries we use to store information.
We are making periodic structures, thus n and px are number of structures and their pitch (periodicity).

For some reason this code works on windows but doesn't work on linux.

Did someone understand why is that the case?

Thanks in advance!

Comments

  • If you don't give me a full working example, I can just guess. If you can't send your code you should try to boil down the issue to a simple example.

    So I'm guessing that's because of different Python versions.

    First of all you should drop "new" in "pya.ICplxTrans.new". Constructing an object is done with "pya.ICplxTrans(...)". "new" is just an idiom used in the documentation for sake of generality. It means "constructing an object in the specific language's way".

    If this does not help, check if "Instance_cell_index" is really an integer number.

    Matthias

Sign In or Register to comment.