title: ClientForm.AmbiguityError: more than one control matching name
body: <p>I am new programming in python and recently trying to login to private website with mechanize;I read similar questions like:
  <a href="https://stackoverflow.com/questions/8854763/how-to-bypass-mechanize-ambiguityerror-in-python">How to bypass Mechanize &quot;AmbiguityError&quot; in Python</a>, <a href="https://stackoverflow.com/questions/21035713/python-mechanize-handle-two-parameters-with-same-name">python mechanize handle two parameters with same name</a>, however non of these could help and there is no feedback on solution for the second link. As far as I've read, using br.select_form(nr=0) should be enough to select the first form however I am still stuck; I've tried as well changing br.select_form(name of form) and br.form.find_control() with AttributeError: 'NoneType' object has no attribute 'find_control'; all options without success.
  Below code and the list of forms can be found. Support is appreciated. Thanks</p>
  
  <p>this is the code used:</p>
  
  <pre><code>br = mechanize.Browser()
  br.set_handle_robots(False)
  cj = cookielib.LWPCookieJar()
  br.set_cookiejar(cj)
  br.select_form(nr=0)
  br.form["username"]= 'Myusername'
  br.form["password"]= 'Mypassword'
  br.submit()
  </code></pre>
  
  <p>these are the forms:</p>
  
  <pre><code>&lt;HiddenControl(smauthreason=0) (readonly)&gt;
  &lt;HiddenControl(clientfp=) (readonly)&gt;
  &lt;HiddenControl(smtryno=0) (readonly)&gt;
  &lt;TextControl(username=)&gt;
  &lt;PasswordControl(password=)&gt;
  &lt;TextControl(username=)&gt;
  &lt;PasswordControl(password=)&gt;
  &lt;TextControl(username=)&gt;
  &lt;PasswordControl(password=)&gt;
  &lt;IgnoreControl(submitFrm=&lt;None&gt;)&gt;
  &lt;HiddenControl(SMAGENTNAME= "deleted by me") (readonly)&gt;
  &lt;HiddenControl(POSTPRESERVATIONDATA=) (readonly)&gt;&gt;
  </code></pre>
  
  <p>This is the result:</p>
  
  <pre><code>Traceback (most recent call last):
  File "C:/Documents/JMARTINEZ/My Various/PythonPrograms/Mechanize.py",line 77, in &lt;module&gt; br.form["username"]= username
   File "C:\Python27\lib\site-packages\ClientForm.py", line 2895, in __setitem__control = self.find_control(name)
   File "C:\Python27\lib\site-packages\ClientForm.py", line 3222, in find_control return self._find_control(name, type, kind, id, label, predicate, nr)
   File "C:\Python27\lib\site-packages\ClientForm.py", line 3304, in _find_control raise AmbiguityError("more than one control matching "+description)ClientForm.AmbiguityError: more than one control matching name 'username'
  </code></pre>