-
-
Notifications
You must be signed in to change notification settings - Fork 696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weasyprint.exe : Fontconfig error: Cannot load default config file: No such file: (null) #2138
Comments
Hi!
No, the exe file includes everything. I suspect that WeasyPrint can’t reach the default Windows folders that contain fonts, for your system and for your user. |
Thanks. |
Disclaimer: I don’t use Windows at all. Fontconfig’s default config searches fonts in WINDOWSUSERFONTDIR and WINDOWSFONTDIR (at least), that seem to be constant values only used in Fontconfig. Here’s the code: https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/src/fcxml.c So I suspect that the unavailable folder is |
Thanks for your response. |
On the server, do you launch your script with a user that has a home directory? Sometimes, on servers, scripts are launched by specific users with less rights than "normal" users. |
Yes, the user on server is less privileged and not a 'normal' user, but I tested by running WeasyPrint.exe manually from Admin user as well and got the same error. |
Not sure about the root cause, but adding the weasyprint.exe file path to PATH environment variable seems to fix the problem on server. |
OK, that’s strange. Let’s close the issue for now, and reopen it if the problem comes back. |
I'm also experiencing this error and unfortunately adding weasyprint as a Path environment variable didn't solve the problem. @aditya119 was there anything else you remember doing to fix this issue? Any help is much appreciated! |
On one particular server it was found that font config path was also needed. |
Thanks for the fast reply! Unfortunately that didn't work either, anything else you can think for me to try? |
Unfortunately, i can't think of anything else.
|
No worries, appreciate the help @aditya119! @liZe have you happen to see similar issues for other users? |
No. As explained above, Fontconfig is configured to look for config files in |
Yes, the folder does exist and I see the "fontconfig" subfolder which contains a "cache" folder. |
Then I don’t know why this message appears on your computer. Is WeasyPrint able to use the fonts installed on your system? |
This is happening for me also. I have setup the env. paths and everything the fontconfig folder exists too. |
Executing the weasyprint.exe works on some machines but fails on others.
Please let me know if there are some prerequisites to run the exe properly, I think the GTK and python installation is needed only for using it as a library.
I have seen other issues but they focus on running weasyprint python library on Windows, whereas I'm just trying to run the exe.
It is working fine on my development system, but fails with above error when deploying to server.
I have added various stack traces that I could extract:
Thanks in advance.
The text was updated successfully, but these errors were encountered: