Problems with GdsImport?

Tom Varga
  • Tom Varga

    Tom Varga - 2012-01-03

    I'm running into possibly two different problems with GdsImport.  The gds file I'm trying to read in is quite valid as it can be read in by many different CAD tools.  However, gdspy seems to think that it contains 4 different illegal record types.  Is it possible that it doesn't yet support all legal gdsii record types?  I have no idea what's up with the 2nd issue below.  Is it an installation problem?  I'm using Python 2.7.2

    >>> import gdspy
    >>> gdsii = gdspy.GdsImport('foo.gds')
    gdspy - WARNING: Record type TEXT not supported by gds_import.
    gdspy - WARNING: Record type TEXTTYPE not supported by gds_import.
    gdspy - WARNING: Record type PRESENTATION not supported by gds_import.
    gdspy - WARNING: Record type PATHTYPE not supported by gds_import.
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "build/bdist.linux-x86_64/egg/gdspy/", line 2184, in __init__
    TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule 'safe'


  • Heitzmann

    Heitzmann - 2012-01-09

    Hi Tom,

    You're right, the 4 warnings just mean that TEXT elements are not supported in gdspy yet, although I don't actually know if they'll ever be, since they are almost always just annotations on the CAD, and not actual CAD elements that will be latter cut, etched, or processed in any tool.

    As for the error, it's hard to say without further info. Is there any chance you can send me this GDS file?


  • Bernardo Kyotoku

    Hey Lucas,
    Updating the thread for readers benefit. TEXT elements support was added in 0.4

    Some bug with TEXT element.

    >>> from gdspy import *
    >>> GdsImport('test.gds')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python2.7/dist-packages/gdspy/", line 2585, in __init__
      File "/usr/local/lib/python2.7/dist-packages/gdspy/", line 2719, in _create_label
        return Label(**kwargs)
    TypeError: __init__() got an unexpected keyword argument 'x_reflection'

    The test file is in
    I created it using klayout.


  • Heitzmann

    Heitzmann - 2013-01-15

    Thanks, I actually know about this bug.
    It's going to be addressed in 0.4.1, although x_reflection for text won't be supported in the viewer.

  • Richard Wilkinson

    I also get:

    UserWarning: [GDSPY] Record type PATHTYPE not supported by gds_import.

    Is PATHTYPE going to be supported in gdspy any time soon?

  • Heitzmann

    Heitzmann - 2013-10-30

    Probably not... it's not so easy to support that record with the current setup. Sorry about that.
    Just out of curiosity, what do you use paths for? Is it specific to any other editor you use?

  • Richard Wilkinson

    The editor is LEdit. I was using gdspy to add a suffix to all the cell names. I don't know why paths are used out of LEdit. I would have thought polygons would be just as good but I'm not an expert!

  • Heitzmann

    Heitzmann - 2013-10-30

    No, you're absolutely right! Polygons can handle everything paths do with more flexibility, that's why I did not worry about them until gdspy started importing other GDS files, and even now there are these bits still missing.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks