Skip to content

[Bug] Graphical Modeler: multiple variables used in single option are not substituted properly #7212

@landam

Description

@landam

Describe the bug

Let's have a model which uses multiple variables in a single tool option:

Image

When the model is converted into Python code (using GRASS 8.4.2), only one of variables is substituted:

    run_command("r.in.pdal",
                flags="eo",
                overwrite=True,
                input=f"%path/dmr5g/{options['tile']}.laz",
                output=f"{options['tile']}_dmr",

Current dev version (main) is even worse - no variables are substituted!

                input="%path/dmr5g/%tile.laz",
                output="%tile_dmr",

To reproduce

  1. Open attached model 06_grass_chm_v3.zip in Graphical Modeler
  2. Go to Script editor tab

Expected behavior

All variables substituted properly:

    run_command("r.in.pdal",
                flags="eo",
                overwrite=True,
                input=f"{options['path']}/dmr5g/{options['tile']}.laz",

System description

  • Operating System: Linux
  • GRASS version: 8.4.2 and 8.6 (main)

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIwxGUI relatedbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions