Troubleshooting
This page describes solutions to known issues.
WeasyPrint cannot import external libraries
Symptom: When you enter the mmg
command in Windows PowerShell, the following error occurs.
PS D:\> mmg --version
-----
WeasyPrint could not import some external libraries. Please carefully follow the installation steps before reporting an issue:
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#troubleshooting
-----
Traceback (most recent call last):
.....
OSError: cannot load library '.....': .....
Cause: This is a problem that occurs when GTK is not properly installed on Windows. This can also occur if you install GTK before installing Python.
Solution: Download and install the latest GTK3 installer.
Reference: WeasyPrint > First steps > Installation > Windows
GLib-GIO-WARNING warning is output on Windows
Symptom: When you use mmg
in Windows PowerShell, the following warning is output.
GLib-GIO-WARNING **: 13:19:49.232: Unexpectedly, UWP app `*******.*******_0.0.00.0_****__************' (AUMId `*******.*******_************!App') supports 00 extensions but has no verbs
This warning message does not affect the operation of MMG, so you can ignore it.
Solution: Remove or reinstall the Windows app mentioned in the warning message from Microsoft Store.
For example, remove or reinstall the Clipchamp
app in the following case.
GLib-GIO-WARNING **: 13:19:49.232: Unexpectedly, UWP app `Clipchamp.Clipchamp_2.7.10.0_neutral__yxz26nhyzhsrt' (AUMId `Clipchamp.Clipchamp_yxz26nhyzhsrt!App') supports 41 extensions but has no verbs
Reference: https://stackoverflow.com/a/71053742/17167856
Markdown files are not converted properly when HTML tags are included
To generate HTMLs, MMG uses the markdown package for markdown files. And when generating PDFs, it first converts to HTML and then converts to PDF.
However, when markdown contains HTML tags, it may not be converted properly in the following cases. The reason for this is that the markdown package requires the syntax described in Markdown in HTML Extension.
<div align="center">
Hello, world!
</div>
After you fix it as follows, it will be converted properly.
<div align="center" markdown>
Hello, world!
</div>