@@ -461,7 +461,8 @@ def _(
461461 for child in node .children :
462462 if isinstance (child , nodes .title ):
463463 table_no_titles_msg = (
464- f"Table has a title '{ child .astext ()} ', but Notion tables "
464+ f"Table has a title '{ child .astext ()} ' on line "
465+ f"{ child .line } in { child .source } , but Notion tables "
465466 "do not have titles."
466467 )
467468 # Ignore error which is about a type error, but we want to
@@ -472,8 +473,19 @@ def _(
472473 table_structure = _extract_table_structure (node = node )
473474
474475 if len (table_structure .header_rows ) > 1 :
476+ first_header_row = table_structure .header_rows [0 ]
477+ first_header_row_entry = first_header_row .children [0 ]
478+ first_header_row_paragraph = first_header_row_entry .children [0 ]
479+ first_header_row_line = first_header_row_paragraph .line
480+ last_header_row = table_structure .header_rows [- 1 ]
481+ last_header_row_entry = last_header_row .children [0 ]
482+ last_header_row_paragraph = last_header_row_entry .children [0 ]
483+ last_header_row_line = last_header_row_paragraph .line
475484 table_multiple_header_rows_msg = (
476- "Tables with multiple header rows are not supported."
485+ "Tables with multiple header rows are not supported. "
486+ f"First header row is on line { first_header_row_line } in "
487+ f"{ first_header_row_paragraph .source } , last header row is on "
488+ f"line { last_header_row_line } "
477489 )
478490 raise ValueError (table_multiple_header_rows_msg )
479491
0 commit comments