All layers are stored in a Pandas DataFrame in the cfg module. You can access it as
df = nd.cfg.layer_table
nd.get_layers() simply gets you the same DataFrame with a column filter added, but a column name has been changed into “layer_name”, hence the error. Will fix that and put a test on it.
Alternatively to print the layers to stdout you can use