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
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2009-04-22.16:03:37.351>created_at=<Date2004-11-09.16:54:37.000>labels= ['type-feature', 'library']
title='not enough information in SGMLParseError'updated_at=<Date2009-04-22.16:03:37.340>user='https://bugs.python.org/ezust'
When SGMLParser encounters a badly formed webpage, it
throws sgmllib.SGMLParseError with a cryptic message:
[bin] > python sgmlparsertest.py
Pythonlib's error message: expected name token
I think it should give the line and offset, and maybe
even the text it had problems with, in the args of the
exception. And print it out in the message.
My extra information: error at line 1 offset 2
<head>
^
[bin]
I tried to print it out by using parser.getpos() but it
returns values which do not correspond to the error.
How do I determine this at runtime?
Closing, the message does currently include the problematic text. The
output in both 2.5 and trunk is:
Pythonlib's error message: expected name token at '<!<img src="image/at'
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: