title: Trouble with creating serial object in Python
body: <p>I'm writing a program that is supposed to communicate with an Arduino-unit using the serial-object. Within the <strong>init</strong>-method of a class this piece of code can be found:</p>
  
  <pre><code>    try:
          self.rotor  = serial.Serial(port = "COM22", baudrate=115200, timeout = 0.1, writeTimeout = 1)
      except serial.SerialException, e:
          print "Error when connecting to collimator: ", e
  </code></pre>
  
  <p>When I run it I get this error message:</p>
  
  <pre><code>SerialException: could not open port 'COM1': WindowsError(2, 'The system cannot find the file specified.')
  </code></pre>
  
  <p>I asked the computer to open COM22, and it responds that it cannot open COM1. What's
  that about? The Arduino-unit is plugged into COM22.</p>
  
  <p>I have another program that I haven't written myself, but which utilizes the same class library. This program works, but I don't understand how. Is there some sort of initialization of the serial-object that I have missed to do?</p>