Bug 33659

Summary: commit-queue failed to catch ParseError exception
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: abarth
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 33277    

Description Eric Seidel (no email) 2010-01-14 01:45:21 PST
commit-queue failed to catch ParseError exception

https://bugs.webkit.org/show_bug.cgi?id=32641#c23

Not sure what exactly is going on here.  See backtrace in the other bug.
Comment 1 Eric Seidel (no email) 2010-01-14 02:40:54 PST
I just had this happen to me using "webkit-patch land" on bug 32641 as well.  I think mechanize/beautifulsoup has trouble when there are things which look like html tags mentioned in bug comments.

Adding comment to bug 32641
Traceback (most recent call last):
  File "/Stuff/Projects/WebKit/WebKitTools/Scripts/webkit-patch", line 108, in <module>
    WebKitPatch().main()
  File "/Stuff/Projects/WebKit/WebKitTools/Scripts/webkitpy/multicommandtool.py", line 299, in main
    return command.check_arguments_and_execute(options, args, self)
  File "/Stuff/Projects/WebKit/WebKitTools/Scripts/webkitpy/multicommandtool.py", line 113, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/Stuff/Projects/WebKit/WebKitTools/Scripts/webkitpy/commands/abstractsequencedcommand.py", line 43, in execute
    self._sequence.run_and_handle_errors(tool, options, self._prepare_state(options, args, tool))
  File "/Stuff/Projects/WebKit/WebKitTools/Scripts/webkitpy/stepsequence.py", line 66, in run_and_handle_errors
    self._run(tool, options, state)
  File "/Stuff/Projects/WebKit/WebKitTools/Scripts/webkitpy/stepsequence.py", line 60, in _run
    step(tool, options).run(state)
  File "/Stuff/Projects/WebKit/WebKitTools/Scripts/webkitpy/steps/closebugforlanddiff.py", line 55, in run
    self._tool.bugs.post_comment_to_bug(bug_id, comment_text)
  File "/Stuff/Projects/WebKit/WebKitTools/Scripts/webkitpy/bugzilla.py", line 554, in post_comment_to_bug
    self.browser.select_form(name="changeform")
  File "./autoinstall.cache.d/-1555206040/mechanize-0.1.11.zip/mechanize-0.1.11/mechanize/_mechanize.py", line 505, in select_form
  File "./autoinstall.cache.d/-1555206040/mechanize-0.1.11.zip/mechanize-0.1.11/mechanize/_html.py", line 546, in __getattr__
  File "./autoinstall.cache.d/-1555206040/mechanize-0.1.11.zip/mechanize-0.1.11/mechanize/_html.py", line 559, in forms
  File "./autoinstall.cache.d/-1555206040/mechanize-0.1.11.zip/mechanize-0.1.11/mechanize/_html.py", line 228, in forms
mechanize._html.ParseError
Comment 2 Eric Seidel (no email) 2010-01-14 02:41:12 PST
At least now we have a reproducible case to work from :)
Comment 3 Eric Seidel (no email) 2010-01-24 22:29:06 PST
The solution is to use Browser(factory=RobustFactory()) during creation.  That tells mechanize to not use python's (strictish) HTML parser) and instead use BeautifulSoup.  Should be a simple one line change.  We could even write a test if we redirect to a file:// url.
Comment 4 Adam Barth 2010-01-24 22:31:08 PST
Great!  I look forward to your patch.  :)
Comment 5 Eric Seidel (no email) 2010-03-25 01:01:50 PDT
Struck again:
https://bugs.webkit.org/show_bug.cgi?id=36367#c4