Skip to content

Fails with command line configuration file #48

@pirmink

Description

@pirmink
  • PyFlexPlot version: 1.1.4
  • Python version: 3.11.6
  • Operating System: SUSE Linux Enterprise Server 15 SP4

Description

Pyflexplot fails after producing pdf files but before merging them when using a configuration file specified on the command line.

Example

The command
pyflexplot --dest=/scratch/mch/kaufmann/flexpart/job/66/plot_depo icon-ch1-ctrl_depo_pdf.toml
fails with

  File "/scratch/mch/kaufmann/src/pyflexplot/src/pyflexplot/cli/cli.py", line 222, in cli
    wrapped_main(ctx, **kwargs)
  File "/scratch/mch/kaufmann/src/pyflexplot/src/pyflexplot/cli/main.py", line 145, in main
    dry_run=pdf_dry_run,
            ^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'pdf_dry_run' where it is not associated with a value

The same happens even when an otherwise working preset-file is used, such as
pyflexplot --setup infile /scratch/mch/kaufmann/flexpart/job/66/output/grid_conc_20240723060000.nc --dest=/scratch/mch/kaufmann/flexpart/job/66/plot_opr opr_icon-ch1-ctrl_all_pdf.toml
where the latter is a link to a preset file in the repository.

$ ls -l opr_icon-ch1-ctrl_all_pdf.toml
lrwxrwxrwx 1 kaufmann s83 89 2024-08-06 15:43 opr_icon-ch1-ctrl_all_pdf.toml -> /users/kaufmann/src/pyflexplot/src/pyflexplot/data/presets/opr/icon-ch1-ctrl/all_pdf.toml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions