Difference between revisions of "TUFLOW Viewer Matplotlib Font Error"
Jump to navigation
Jump to search
Ellis Symons (talk | contribs) (Created page with "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)...") |
Ellis Symons (talk | contribs) |
||
Line 18: | Line 18: | ||
: [[File: file_explorer_mpl_cache_location.PNG]] | : [[File: file_explorer_mpl_cache_location.PNG]] | ||
<li> 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) | <li> 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) | ||
+ | <li> If the problem persists, try deleting all the fontlist files in the folder. | ||
</ol> | </ol> |
Latest revision as of 18:57, 5 March 2025
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)
- If the problem persists, try deleting all the fontlist files in the folder.