Closed MaGering closed 1 year ago
This probably has the same cause as #261
Moved from @MaGering's comment in #264:
Executing
snakemake -j1 plot_all_examples
however I get the following error (Update: moved to #262
[Wed Sep 28 15:18:38 2022]
rule plot_scalar_results:
input: results/example_base/postprocessed
output: results/example_base/plotted/scalars
jobid: 1
reason: Missing output files: results/example_base/plotted/scalars
wildcards: scenario=example_base
resources: tmpdir=/tmp
Traceback (most recent call last):
File "scripts/plot_scalar_results.py", line 869, in <module>
plot_capacities()
File "scripts/plot_scalar_results.py", line 454, in plot_capacities
plot.prepare_data(agg_regions=config.settings.plot_scalar_results.agg_regions)
File "scripts/plot_scalar_results.py", line 189, in prepare_data
self.prepared_scalar_data = prepare_scalar_data(
File "scripts/plot_scalar_results.py", line 121, in prepare_scalar_data
df_pivot = drop_constant_multiindex_levels(df_pivot)
File "scripts/plot_scalar_results.py", line 117, in drop_constant_multiindex_levels
_df.index = _df.index.droplevel(drop_levels)
File "/home/local/RL-INSTITUT/marie-claire.gering/anaconda3/envs/oemof-B3/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 1505, in droplevel
raise ValueError(
ValueError: Cannot remove 3 levels from an index with 3 levels: at least one level must be left.
[Wed Sep 28 15:18:39 2022]
Error in rule plot_scalar_results:
jobid: 1
output: results/example_base/plotted/scalars
shell:
python scripts/plot_scalar_results.py results/example_base/postprocessed results/example_base/plotted/scalars results/example_base/example_base.log
(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
Removing output files of failed job plot_scalar_results since they might be corrupted:
results/example_base/plotted/scalars
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2022-09-28T151838.529322.snakemake.log
This is a bug in the script "plot_scalars". The scalar plots stopped working for single scenarios after supporting plots for several scenarios.
Updated error report:
Plotting with
plot_scalar_results.py
does not work for examples and single scenarios. There are the following errors:capacities have been removed from results. This leads to an error running
We will drop this function as the capacities are input parameters, not results.
These plotting functions do not work with single scenarios, we have to find out why:
Original error report:
I can't run
due to
FileNotFoundError
:Is there something one has to do in order to get the examples running (copying a file from A to B)? If yes, it is not mentioned in the docs so far and the label needs to change from
bug
todocumentation
.