You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document object is missing part.custom_xml_parts on Linux.
I have the same code on Windows and Ubuntu. The same repo and the same file.
On Windows, Document instance under part returns custom_xml_parts. Under Linux there is no such field in parts.
fromdocximportDocumentfromlxmlimportetreeimportdatetime# read document in IOBytedoc=Document('samples/Document-00.docx')
# This code fails on Linux and works on Windows on the same docx file. On Linux there is not such field custom_xml_partscustom_xml_parts=doc.part.custom_xml_parts# list all custom_xml_partsXea_xml=Nonefori, custom_xmlinenumerate(custom_xml_parts):
# check if exists attrib "author" and it is "XXX"if (custom_xml.attrib.get('author') =='XXX'):
Xea_xml=custom_xmlbreak```
The text was updated successfully, but these errors were encountered:
Document object is missing part.custom_xml_parts on Linux.
I have the same code on Windows and Ubuntu. The same repo and the same file.
On Windows, Document instance under part returns custom_xml_parts. Under Linux there is no such field in parts.
The text was updated successfully, but these errors were encountered: