gsiClassBase error


I receive the following error when trying to run python scripts using the PyPi klayout package.

$ klayout -b -r
ERROR: ../../../src/gsi/gsi/,611,(*c)->declaration () != 0
ERROR: Internal error: ../../../src/gsi/gsi/ (*c)->declaration () != 0 was not true

Ubuntu 18.04 on WSL
klayout 0.26.8, installed from .deb
qt 5.9.5
gcc 7.5.0

This setup was previously working without issue (although that was > 1 year ago) and the scripts run as expected on a different machine (with a different setup).

Any ideas what the issue might be?



  • Hi James,

    Is there a reason you're using PyPI packages with klayout? klayout itself comes with "pya" built in.

    I think the message you see basically means a redeclaration of the same C++ class into Python space. This happens when you load the PyPI package with KLayout's classes already in place.


  • Hi Matthias,

    There are a few reasons, some of them old hangups, others somewhat justified. Installing the bare-bones python package via pip is very compact and easy to roll out across various machines, which all have different configurations/distributions, etc. We also make use of external python packages and the whole setup is easier to manage via pip/anaconda.

    In any case, you're totally right: pointing to "pya" instead of "klayout.db" resolves the issue. These scripts were previously built via straight python, not the klayout embedded version. Seems I forgot that detail somewhere along the way.

    Thanks for the help.


Sign In or Register to comment.