VIDA-NYU / reprozip

ReproZip is a tool that simplifies the process of creating reproducible experiments from command-line executions, a frequently-used common denominator in computational science.
https://www.reprozip.org/
BSD 3-Clause "New" or "Revised" License
303 stars 33 forks source link

Reprounzip and missing font when trying to plot a figure using Matplotlib #391

Open milech opened 1 year ago

milech commented 1 year ago

Running reprounzip directory run folder with unpacked code that plots a figure using matplotlib causes the following exception to be thrown:

findfont: Generic family 'sans-serif' not found because none of the following families were found: DejaVu Sans, Bitstream Vera Sans, Computer Modern Sans Serif, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif
findfont: Font family ['DejaVu Sans'] not found. Falling back to DejaVu Sans.
Failed to find font DejaVu Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0, and fallback to the default font was disabled.

No font was specified, so I assume it should use the default one.

Matplotlib==3.6.2 Python==3.9.15

milech commented 1 year ago

I have seen issue #360 and it looks like the request there was to eliminate the necessity of packing all the fonts. Was any modification introduced to Reprozip to address that request? If so, it might be the reason why now fonts are not seen after unpacking the rpz. Do you know a simple hack that could be added in code to ensure it runs without this issue after unpacking?

remram44 commented 1 year ago

The directory unpacker provides no isolation so it's hard to tell if the experiment even looked in the right place. $HOME is set so hopefully yes.

Does this happen if you use another unpacker?

milech commented 1 year ago

We haven't managed to run the docker version because it's searching for the absolute paths from the machine where the trace was done, although no absolute paths were specified anywhere in the code.