Skip to content

Last item.data() of pya.LayoutQuery returns None #261

Closed

Description

@olcc

This ticket refers to this issue mentioned in the forum: https://www.klayout.de/forum/discussion/1218/custom-query-in-a-python-script-bugs

In a query like below, the last item.data() unduly returns None. In particular, if there is only one cell instance matching the query, the result is result = [None], which is disappointing.

query = "select cell.name from instances of .. where cell_name ~ 'CellName1'"
result = [item.data() for item in pya.LayoutQuery(query).each(layout)]

Olivier (KLayout 0.25.8, Debian Linux)

Activity

  1. klayoutmatthias commented on Apr 16, 2019

    @klayoutmatthias
    Collaborator

    Hi Olivier,

    thanks for this issue report. I can reproduce it, but that does not seem to be a systematic issue. With "search and replace" the result is fine. I'll check the Python integration code.

    Regards,

    Matthias

  2. added a commit that references this issue on Apr 16, 2019
    0bde414
  3. klayoutmatthias commented on Apr 16, 2019

    @klayoutmatthias
    Collaborator

    I guess I found the root cause. I'll give it some testing and then merge it.

  4. added a commit that references this issue on Apr 17, 2019
    e42b731
  5. added a commit that references this issue on Jun 18, 2019
    d3c2c0f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions