当我尝试从python-docx导入任何模块时,出现此错误和其余代码,然后无法正常工作
任何想法请帮忙,我什至卸载并重新安装但出现相同错误:
Class 'WD_ROW_HEIGHT_RULE' has no 'EXACTLY' member
from docx import Document
from docx.shared import Inches
from docx.shared import Cm
from docx.enum.table import WD_ROW_HEIGHT_RULE
table = document.add_table(rows=1, cols=2)
table.style = 'Medium Shading 1 Accent 2'
table.rows[0].height_rule = WD_ROW_HEIGHT_RULE.EXACTLY