Tools to Capture and Convert the Web
GrabzIt's Online Community

python *docx* return a error

Ask questions on how to capture or convert web pages or HTML into images, CSV, PDF or DOCX documents as well on how to convert videos into animated GIF's using our API.

i use grabzIt.HTMLToDOCX to create a *docx*, when i use docx.Document to return a |Document| object loaded from *docx*, python return a error

Traceback (most recent call last):
File "/Users/chenjiahua/PycharmProjects/my_game/mysite/export2word/test.py", line 30, in <module>
composer.append(doc2)
File "/Users/chenjiahua/PycharmProjects/work/zhongbiao_web_svr/venv/lib/python3.7/site-packages/docxcompose/composer.py", line 51, in append
self.insert(index, doc, remove_property_fields=remove_property_fields)
File "/Users/chenjiahua/PycharmProjects/work/zhongbiao_web_svr/venv/lib/python3.7/site-packages/docxcompose/composer.py", line 71, in insert
self.add_styles(doc, element)
File "/Users/chenjiahua/PycharmProjects/work/zhongbiao_web_svr/venv/lib/python3.7/site-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)

Asked by anonymous on the 30th of April 2019

Sorry, but that seems to be an error is someone elses software. It looks like it could be related to this issue: https://www.odoo.com/forum/help-1/question/argument-element-has-incorrect-type-when-exporting-report-from-openoffice-22024

Answered by anonymous on the 30th of April 2019

thanks, i just pass this error,no influence

Answered by anonymous on the 30th of April 2019