WeasyPrint icon indicating copy to clipboard operation
WeasyPrint copied to clipboard

Weasyprint.exe : Fontconfig error: Cannot load default config file: No such file: (null)

Open aditya119 opened this issue 3 months ago • 6 comments

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:

WeasyPrint exited with code -1073741819.
Error: Fontconfig error: Cannot load default config file: No such file: (null)
Fontconfig error: "memory", line 2: SHGetFolderPathA failed
Fontconfig error: "memory", line 3: SHGetFolderPathA failed
Fontconfig error: No writable cache directories
Fontconfig error: Cannot load default config file: No such file: (null)
Fontconfig error: "memory", line 2: SHGetFolderPathA failed
Fontconfig error: "memory", line 3: SHGetFolderPathA failed
Fontconfig error: No writable cache directories
>weasyprint.exe --info abc.html abc.pdf
Fontconfig error: Cannot load default config file: No such file: (null)
System: Windows
Machine: AMD64
Version: 10.0.17763
Release: 2019Server

WeasyPrint version: 61.2
Python version: 3.12.2
Pydyf version: 0.9.0
Pango version: 15014
>weasyprint --debug abc.html abc.pdf
Fontconfig error: Cannot load default config file: No such file: (null)
INFO: Step 1 - Fetching and parsing HTML - abc.html
Fontconfig error: Cannot load default config file: No such file: (null)
INFO: Step 3 - Applying CSS
INFO: Step 4 - Creating formatting structure
INFO: Step 5 - Creating layout - Page 1

Thanks in advance.

aditya119 avatar Apr 27 '24 19:04 aditya119