Closed erebodino closed 2 years ago
This library doesn't use fontconfig directly, but it's likely a transitive dependency of weasyprint.
Hard to say what's going on without the full error, can you post the complete stacktrace and any other output that you're getting?
Exactly, the error belogns to weasyprint, I've managed solved that error, but now i'm stuck in another. It's seems that weasyprint in windows has some very weak points, the new error is:
`Traceback (most recent call last):
File "C:\Users\Machina\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Machina\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Machina.virtualenvs\erp-budget-integration-TOP-e592yWRN\Scripts\weasyprint.exe__main.py", line 4, in
OSError: cannot load library 'pango-1.0-0': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'pango-1.0-0'`
I did everything that it's reported until now in the instructions weasyprint-windows and in the issues reported #589, 721, and 1240
Looks like pango is not installed. I've no idea of how to install anything on windows, so can't help here. Check the weasyprint / pango issues and documentation.
I was able to solved. In my case it was a problem with a .dll from graphviz. I did everything what they said to made a successful instalation, and the problem change from that missing library to Fontconfig error: Cannot load default config file
(only that) which was harder to debug due to lack of information in the error. So how I managed to overcome this and keep weasyprint working?
1.- Check the enviroment variables in windows, everithing must be as weasyprint docs says.
2.- Then look for WHERE fontconfig.dll
and there was the problem, it's points to Graphviz.
3.- Uninstall weasyprint, GTK3 and Graphviz and then reinstall weasyprint and GTK3, and everything worked.
weasyprint has a issue in #1339
I made a django website for windows 10 with the weasyprint library. Also installed GTK+ for Windows Runtime Environment (мversion 3). The same errors were thrown.
I tried to swap paths in path, updated windows to 11, but it didn't help.
Then i pasted 'sitecustomize.py' like Tontyna https://github.com/Kozea/WeasyPrint/issues/971#issuecomment-544195744 to the virtual environment folder '/Lib/site-packages'
another error occurred: Fontconfig error: Cannot load default config file.
It turned out that the 'C:\Users\os.environ['PATH'] = GTK_FOLDER + os.pathsep + os.environ.get('PATH', '')
to the line:
os.environ['PATH'] = GTK_FOLDER
and it WORKS
fwiw I had this error on a django project with a clean venv, which didn't give a stacktrace; the issue was a windows installation of graphviz outside the environment.
Thank you! After uninstalling Graphviz
on windows 10, everything works fine.
The title is the error which shows up when i'm trying to run the migration.
I'm using pipenv as package manager with python 3.10 y django 4.0.7. I tried with another version of django =4.0 but it gave me the same error. I'm using windows 10 as OS. The error is not very verbose so i'm not able to track from where it's start.