TUFLOW Viewer Matplotlib Font Error
Jump to navigation
Jump to search
This page describes how to fix TUFLOW Viewer if you get the following error (or similar). Unfortunately this is a bug with the plotting library TUFLOW Viewer uses (matplotlib) and is due to an issue with its cached data.
ValueError: 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
To fix this issue, the matplotlib cache data will need to be deleted. The steps below describe how to do this:
- Open QGIS
- Open the Python interpreter
- In the python interpreter type the following commands:
import matplotlib print(matplotlib.get_cachedir())
- This will print the matplotlib cache directory
- In this directory, delete the fontlist-v330.json file
- Try opening TUFLOW Viewer (you should not need to restart QGIS, however if it still doesn't work then restarting QGIS will be worth trying)