Snakemake runs data_parser.py to produce the figures.
To run it successfully, latex packages must be installed or the following error will arise:
(temoa-py3) roberto ~/github/pride/temoa-uiuc (hydrogen) $ snakemake --cores=4
Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 4
Rules claiming more threads will be scaled down.
Job counts:
count jobs
1 all
1 make_emission_plots
1 make_temoa_input
1 temoa_run
4
Select jobs to execute...
[Fri Dec 18 07:29:26 2020]
rule make_temoa_input:
input: data_files/09_uiuc.sql
output: data_files/09_uiuc.sqlite
jobid: 1
wildcards: db=09_uiuc
[Fri Dec 18 07:29:26 2020]
rule temoa_run:
input: data_files/run_scenario09.txt
output: data_files/09_uiuc_scenario09_model/scenario09_OutputLog.log, data_files/09_uiuc_scenario09_model/scenario09.lp
jobid: 2
wildcards: db=09_uiuc, scenario=scenario09
[Fri Dec 18 07:29:26 2020]
Finished job 1.
1 of 4 steps (25%) done
1 .db DD file(s) converted
-------------------------
Config file: /home/roberto/github/pride/temoa-uiuc/data_files/run_scenario09.txt
Input file: /home/roberto/github/pride/temoa-uiuc/data_files/09_uiuc.dat
Output file: /home/roberto/github/pride/temoa-uiuc/data_files/09_uiuc.sqlite
Scenario: scenario09
Spreadsheet output: False
Myopic scheme: False
Retain myopic databases: False
-------------------------
Citation output status: None
NEOS status: False
Version output status: False
-------------------------
Selected solver status: cbc
Solver LP write status: False
Pyomo LP write status: True
-------------------------
MGA slack value: None
MGA # of iterations: None
MGA weighting method: None
**NOTE: If you are performing MGA runs, navigate to the DAT file and make any modifications to the MGA sets before proceeding.
Please press enter to continue or Ctrl+C to quit.
Notice: Using the CBC solver interface.
Continue Operation? [Press enter to continue or CTRL+C to abort]
Solver will write file: scenario09.lp
[ 0.04] Reading data files.
[ ] Creating Temoa model instance.Warning: ('uiuc', 'IMPELC', 2000) has a specified Efficiency, but does not have any existing install base (ExistingCapacity).
[ 0.76]
[ ] Solving.Solver log file: '/home/roberto/github/temoa/data_files/debug_logs/lp_files/tmpqmruwkkh.cbc.log'
Solver solution file: '/home/roberto/github/temoa/data_files/debug_logs/lp_files/tmp0tguqtg3.pyomo.soln'
Solver problem files: ('/home/roberto/github/temoa/data_files/debug_logs/lp_files/tmp0tguqtg3.pyomo.lp',)
[ 0.89]
[ 1.15] Calculating reporting variables and formatting results.
[Fri Dec 18 07:29:31 2020]
Finished job 2.
2 of 4 steps (50%) done
Select jobs to execute...
[Fri Dec 18 07:29:31 2020]
rule make_emission_plots:
input: data_files/09_uiuc_scenario09_model/scenario09_OutputLog.log
output: figures/scenario09_all_emissions_co2eq.png, figures/scenario09_all_emissions_spent-fuel.png, figures/scenario09_all_emissions_ewaste.png
jobid: 3
wildcards: scenario=scenario09
Traceback (most recent call last):
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/texmanager.py", line 277, in _run_checked_subprocess
stderr=subprocess.STDOUT)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['latex', '-interaction=nonstopmode', '--halt-on-error', '/home/roberto/.cache/matplotlib/tex.cache/7547addef7ebd5ce861f8aa58e4b19a4.tex']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/roberto/github/pride/temoa-uiuc/.snakemake/scripts/tmprzjn061r.plot_emissions.py", line 9, in <module>
make_emissions_plots(output, True)
File "/home/roberto/github/pride/temoa-uiuc/data_parser.py", line 631, in make_emissions_plots
save=to_save)
File "/home/roberto/github/pride/temoa-uiuc/data_parser.py", line 451, in emissions_plot
f"{target_folder}{scenario}_{sector}_{variable.lower()}_co2eq.png")
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/pyplot.py", line 859, in savefig
res = fig.savefig(*args, **kwargs)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/figure.py", line 2311, in savefig
self.canvas.print_figure(fname, **kwargs)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 81, in print_figure
super().print_figure(*args, **kwargs)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/backend_bases.py", line 2193, in print_figure
self.figure.draw(renderer)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/figure.py", line 1864, in draw
renderer, self, artists, self.suppressComposite)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/image.py", line 131, in _draw_list_compositing_images
a.draw(renderer)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/artist.py", line 41, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/cbook/deprecation.py", line 411, in wrapper
return func(*inner_args, **inner_kwargs)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/axes/_base.py", line 2707, in draw
self._update_title_position(renderer)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/axes/_base.py", line 2648, in _update_title_position
if title.get_window_extent(renderer).ymin < top:
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/text.py", line 900, in get_window_extent
bbox, info, descent = self._get_layout(self._renderer)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/text.py", line 287, in _get_layout
ismath="TeX" if self.get_usetex() else False)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/backends/backend_agg.py", line 228, in get_text_width_height_descent
s, fontsize, renderer=self)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/texmanager.py", line 423, in get_text_width_height_descent
dvifile = self.make_dvi(tex, fontsize)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/texmanager.py", line 311, in make_dvi
texfile], tex)
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/matplotlib/texmanager.py", line 290, in _run_checked_subprocess
exc=exc.output.decode('utf-8'))) from exc
RuntimeError: latex was not able to process the following string:
b'lp'
Here is the full report generated by latex:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(/home/roberto/.cache/matplotlib/tex.cache/7547addef7ebd5ce861f8aa58e4b19a4.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/type1cm/type1cm.sty)
! LaTeX Error: File `type1ec.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.6 \usepackage
{type1ec}^^M
No pages of output.
Transcript written on 7547addef7ebd5ce861f8aa58e4b19a4.log.
[Fri Dec 18 07:29:41 2020]
Error in rule make_emission_plots:
jobid: 3
output: figures/scenario09_all_emissions_co2eq.png, figures/scenario09_all_emissions_spent-fuel.png, figures/scenario09_all_emissions_ewaste.png
RuleException:
CalledProcessError in line 76 of /home/roberto/github/pride/temoa-uiuc/Snakefile:
Command 'set -euo pipefail; /home/roberto/miniconda3/envs/temoa-py3/bin/python /home/roberto/github/pride/temoa-uiuc/.snakemake/scripts/tmprzjn061r.plot_emissions.py' returned non-zero exit status 1.
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/snakemake/executors/__init__.py", line 2339, in run_wrapper
File "/home/roberto/github/pride/temoa-uiuc/Snakefile", line 76, in __rule_make_emission_plots
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/snakemake/executors/__init__.py", line 560, in _callback
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/snakemake/executors/__init__.py", line 546, in cached_or_run
File "/home/roberto/miniconda3/envs/temoa-py3/lib/python3.7/site-packages/snakemake/executors/__init__.py", line 2351, in run_wrapper
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /home/roberto/github/pride/temoa-uiuc/.snakemake/log/2020-12-18T072926.764823.snakemake.log
Snakemake runs
data_parser.py
to produce the figures. To run it successfully, latex packages must be installed or the following error will arise: