Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 从docx文件读取特殊字符时出错。我需要一盒表格_Python_Docx - Fatal编程技术网

Python 从docx文件读取特殊字符时出错。我需要一盒表格

Python 从docx文件读取特殊字符时出错。我需要一盒表格,python,docx,Python,Docx,我尝试使用docx库从word文档中获取一个特殊字符(一个表单框)。我的代码是: for position, block in enumerate(documentList): if ("EXPL" in normalize_string(block.text) and "PERSON" in normalize_string(block.text)): table = documentList[position+3].table text = tabl

我尝试使用docx库从word文档中获取一个特殊字符(一个表单框)。我的代码是:

for position, block in enumerate(documentList):

    if ("EXPL" in normalize_string(block.text) and "PERSON" in normalize_string(block.text)):
        table = documentList[position+3].table
        text = table.cell(1,1).text
结果是普通文本,没有一个表单框

谢谢