Skip to content

ValueError while acess cell._tc.bottom #1458

Description

@mepwang

OS: updated ubuntu 24.04
Python: 3.12.8
Python-Docx: 1.1.2

test.docx

while parsing table in docx, ValueError exception occurred:
ValueError: no tc element at grid_offset=3

in line: bottom = cell._tc.bottom

code:

forrow_idx, rowinenumerate(table.rows):
forcell_idx, cellinenumerate(row.cells):
top=cell._tc.topbottom=cell._tc.bottomleft=cell._tc.leftright=cell._tc.right

docx file: see test.docx in attachment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions