jjlee/mechanize — Issue #57: Cannot read form with SubmitControl that is disabled and has no value
Author: abielr
Created: 2012-02-12 15:55:55+00:00
State: open

Mechanize crashes when attempting to select a form that includes a SubmitControl that is disabled and has no value. When initializing a SubmitControl with no value, mechanize will attempt to set its value to an empty string; however, since the control is disabled, this will raise an AttributeError. I've encountered this situation on a page that has a disabled image control (ImageControl inherits from SubmitControl).

Here is an example form that will raise the error when br.select_form() or br.forms() is called: