fails to open GDS on Mac, but OK on Windows

I'm writing a script to manipulate GDS, and found that it fails to open GDS on Mac, while ok on Windows.
The script to read GDS is:
# Read and create a layout
lo = LoadLayoutOptions::new
ly = Layout::new
crt_ly = CellView::active
file_name =, lo)

Error message on Mac is:
"Unable to open file: filename.gds (errno=2) in Layout::read"
It is confirmed that "file_name" is actually the file name (without path) of active GDS.

Any idea to solve this problem? Thanks.


  • @akita11 The paths are resolved relative to the current directory and this is the one you start KLayout from. I assume that MacOS uses a different place than Windows.

    You should take the file path from "crt_ly.filename" which gives you the full path.


  • Thanks, actually, it works by using the attribute of "filename" instead of "name", like:, lo)

Sign In or Register to comment.