I just realized that the problem was with how I was substituting img src's with beautifulsoup, my bad. But as a general tip when using weasyprint in Python, errors are usually related to incorrect path's relative to the base_url. Have a good day ;)