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:
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: