The following code does not work anymore after docxcompose has been removed from the required dependencies
my_template = DocxTemplate(some_path)
sub_doc = my_template.new_subdoc("subdoc1")
The error is
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
# -*- coding: utf-8 -*-
"""
Created : 2021-07-30
@author: Eric Lapouyade
"""
from docx import Document
from docx.oxml import CT_SectPr
from docx.opc.constants import RELATIONSHIP_TYPE as RT
> from docxcompose.properties import CustomProperties
E ModuleNotFoundError: No module named 'docxcompose'
Our requirements.txt file refers to docxtpl like
docxtpl~=0.20.0
Our code worked for version 0.20.1 and is broken for 0.20.2
Actually I think such a refactoring should not be part of a patch release but should at least have been part of a minor release. We pinned the version to be protected against such breaking changes.
The following code does not work anymore after docxcompose has been removed from the required dependencies
The error is
Our
requirements.txtfile refers to docxtpl likedocxtpl~=0.20.0Our code worked for version
0.20.1and is broken for0.20.2Actually I think such a refactoring should not be part of a patch release but should at least have been part of a minor release. We pinned the version to be protected against such breaking changes.