我尝试合并2个.docx,我使用docxcompose使其在我的VM上完美运行。
但是当我创建我的gitlab-ci管道时。在由gitlab-ci.yml运行的同一台VM上以及在Shell脚本中的同一命令返回此错误。
Traceback (most recent call last):
File "/usr/local/bin/docxcompose", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/docxcompose/command.py", line 55, in main
compose_files(parser, parsed_args)
File "/usr/local/lib/python2.7/dist-packages/docxcompose/command.py", line 42, in compose_files
composer.append(Document(slave_path))
File "/usr/local/lib/python2.7/dist-packages/docxcompose/composer.py", line 51, in append
self.insert(index, doc, remove_property_fields=remove_property_fields)
File "/usr/local/lib/python2.7/dist-packages/docxcompose/composer.py", line 71, in insert
self.add_styles(doc, element)
File "/usr/local/lib/python2.7/dist-packages/docxcompose/composer.py", line 253, in add_styles
self.doc.styles.element.append(style_element)
TypeError: Argument 'element' has incorrect type (expected lxml.etree._Element, got NoneType)
func=xmlSecCheckVersionExt:file=xmlsec.c:line=188:obj=unknown:subj=unknown:error=19:invalid version:mode=abi compatible;expected minor version=2;real minor version=2;expected subminor version=25;real subminor version=26
当gitlab尝试运行它时,这看起来像是特权错误。
感谢您的帮助