Skip to content

docxcompose is not longer installed as dependency in version 0.20.2 #629

@stefankaufmann

Description

@stefankaufmann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions