[issue26211] HTMLParser: “AssertionError: we should not get here!”

2016-01-27 Thread Yannick Duchêne
Yannick Duchêne added the comment: `reset` is called to stop the parser. If really `reset` should not be called during parser hooks execution, then the documentation should says so and an error should be raised when `reset` is invoked. -- ___

[issue26211] HTMLParser: “AssertionError: we should not get here!”

2016-01-27 Thread Yannick Duchêne
Yannick Duchêne added the comment: I'm closing this issue, as the the issue http://bugs.python.org/issue26210 is the real one and this one seems to be a variant of the former. -- status: open -> closed ___ Python tracker

[issue26211] HTMLParser: “AssertionError: we should not get here!”

2016-01-26 Thread Yannick Duchêne
New submission from Yannick Duchêne: Using HTMLParser on the attached file, I got this: File "/usr/lib/python3.5/html/parser.py", line 111, in feed self.goahead(0) File "/usr/lib/python3.5/html/parser.py", line 171, in goahead k = self.parse_starttag(i) File

[issue26211] HTMLParser: “AssertionError: we should not get here!”

2016-01-26 Thread Xiang Zhang
Xiang Zhang added the comment: Test your html file and can not get the AssertionError. Seems everything works fine. Could you please provide more info? -- nosy: +xiang.zhang ___ Python tracker

[issue26211] HTMLParser: “AssertionError: we should not get here!”

2016-01-26 Thread Xiang Zhang
Xiang Zhang added the comment: After reading Issue26210, I can get the AssertionError when there is a self.reset() in handle_endtag. I don't think it's proper to use reset in the process of parsing. From the samples I find on Web, reset is commonly used to set extra attributes on the parser