Issues running .lydrc from command line for klayout v0.24.2

edited October 2015 in Ruby Scripting
Hello,

I'm trying to run a .lydrc on a large data set that performs some booleans with the following command line:
klayout_app -e -b -r <lydrc path>

I receive the following error:
*** ERROR: <lydrc path>:4: undefined method `log_file' for main:Object

The same error occurs at any global method (source() or verbose() for example).

The first lines of the lydrc file:
<?xml version="1.0" encoding="utf-8"?>
<klayout-macro>
<text>

# LOGGING
log_file('<log path>')
verbose(true)

Any idea what I'm doing wrong? Thank you for any help.

Comments

  • edited October 2015

    Hi,

    does the script run from the macro IDE?

    I think, in your file some of the metadata is missing. Specifically the interpreter is not given. Please try to add this information:

    <?xml version="1.0" encoding="utf-8"?>
    <klayout-macro>
     <category>drc</category>
     <interpreter>dsl</interpreter>
     <dsl-interpreter-name>drc-dsl-xml</dsl-interpreter-name>
     <text>...</text>
    </klayout-macro>
    

    without that information, KLayout will not run the script in the context of the DRC engine.

    Matthias

  • edited November -1
    Hi Matthias,

    That did it, thanks! It's interesting, and maybe I missed spotting a change being made in the documentation for the later KLayout versions, but my original .lydrc ran just fine without those lines on KLayout 0.23.11.

    Thanks again,

    Ryan
  • edited November -1

    Hi Ryna,

    0.24 was heavily reworked in the course of Python integration. I am not aware to have changed the semantics of the .lydrc format, but at least the interpreter spec got more important with Python being a new choice of a script interpreter.

    I think the .lydrc files written by KLayout already contained the interpreter spec, so I hope there is no backward compatibility issue with files written by KLayout itself.

    Regards,

    Matthias

Sign In or Register to comment.