Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails with command line configuration file #48

Open
pirmink opened this issue Aug 6, 2024 · 0 comments
Open

Fails with command line configuration file #48

pirmink opened this issue Aug 6, 2024 · 0 comments

Comments

@pirmink
Copy link
Collaborator

pirmink commented Aug 6, 2024

  • 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
@pirmink pirmink changed the title Fails with custom configuration file Fails with command line configuration file Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant