我用docxcompose模块合并word文档报错in add_shapes img_part = doc.part.rels[rid].target_part,composer.py下的add_shapes方法报错。这个是库的错误我就懵逼了。我的写法,我看官网的也和我的l
具体代码
def merge_documents(file_list,final_docx): for index,items in enumerate(file_list): doc = Document(items) if index==0: composer = Composer(doc) else: doc1 = Document(items) composer.append(doc1) composer.save(final_docx)
直接用file_list[0]影响你写代码的速度了?
def merge_documents(file_list[0],file_list,final_docx):
楼主有解决这个问题吗?遇到同样的问题