title: Pyserial: could not configure port: (5, 'Input/output error)
body: <p>I've been trying to get the following two lines of Python code to run for the past two days, without much success:</p>
  
  <pre><code>import serial
  ser = serial.Serial(0)
  </code></pre>
  
  <p>Each time I run it, I get the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "./test.py", line 4, in &lt;module&gt;
      ser = serial.Serial(0)
    File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 260, in __init__
      self.open()
    File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 280, in open
      self._reconfigurePort()
    File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 308, in _reconfigurePort
      raise SerialException("Could not configure port: %s" % msg)
  serial.serialutil.SerialException: Could not configure port: (5, 'Input/output error')
  </code></pre>
  
  <p>I'm running Ubuntu 11.10 64-bit, with Pyserial 2.5 (python-serial 2.5-2.1) and Python 2.7 (python 2.7.2-7ubuntu2) and my user is a member of the dialout group.</p>
  
  <p>I run Ubuntu 11.10 64-bit at work too, with the same versions of Python and Pyserial, and the problem doesn't seem to occur there. Any suggestions are welcome - I'm pretty flummoxed...</p>
  
  <p>Thanks,
  Donagh</p>