When I import weasyprint
I get the following error:
Fontconfig error: Cannot load default config file: No such file: (null)
Is there a way to suppress this error, because the program runs fine otherwise. Better yet, how do I correct it?
When I import weasyprint
I get the following error:
Fontconfig error: Cannot load default config file: No such file: (null)
Is there a way to suppress this error, because the program runs fine otherwise. Better yet, how do I correct it?
If you're on a Unix-based OS, I Think You need to set the
$FONTCONFIG_PATH
properly in your OS. Usually it is set in/etc/profile
but, if you are executing the command from a non login shell (e.g., through a python script or library), then you need to set it explicitly by doing the following command in your shell and And probably your problem will be solved: