Hello,
While using your scripts, I met an issue with a latex invocation. Here are the (hopefully) relevant parts:
---------------------------------------->8--------------------------------------
$ PYTHONPATH="$PYTHONPATH:." python pub_scripts/outages/main_expected_program.py
Load df and dikt - Loaded df and dikt
Load df_capacity - fail - has to read raw data
Compute program - 0/ 1 - BELLEVILLE 1
findfont: Font family ['serif'] not found. Falling back to DejaVu Sans.
Traceback (most recent call last):
File "/home/d19776/anaconda3/lib/python3.7/site-packages/matplotlib/texmanager.py", line 277, in _run_checked_subprocess
stderr=subprocess.STDOUT)
File "/home/d19776/anaconda3/lib/python3.7/subprocess.py", line 411, in check_output
**kwargs).stdout
File "/home/d19776/anaconda3/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['latex', '-interaction=nonstopmode', '--halt-on-error', '/home/d19776/.cache/matplotlib/tex.cache/7ac0434c544f0eb1d004db4eeae9b2e4.tex']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
[...]
RuntimeError: latex was not able to process the following string:
b'expected_program (tolerated_delay = 0 min)'
[...]
! Missing $ inserted.
$
l.24 {\rmfamily expected_
program (tolerated_delay = 0 min)}
No pages of output.
---------------------------------------->8--------------------------------------
My operating system is Debian GNU/Linux. I wrote the attached patch, which solves the issue on my system. Please consider it for inclusion in case you would be able to reproduce the issue.
Best,
Pierre Gruet
escape_underscores.txt