title: serial.serialutil.SerialException: could not open port 'com7'
body: <pre><code>from flask import Flask
  from flask import request
  from flask import render_template
  from flask import Response
  import serial
  
  main = Flask(__name__)
  
  def serial_start():
      ser = serial.Serial('com7',9600)
      stop_flag = False
      while not stop_flag:
          if ser.readable():
              res = ser.readline()
              res_decode = res.decode()
              print(res_decode)
  
  @main.route('/')
  def hello_fnc():
      Response(serial_start())
      return 'Hello'
  
  @main.route('/page', methods = [&quot;GET&quot;, &quot;POST&quot;])
  def page_fnc():
      if request.method == &quot;POST&quot;:
          return 'POST received'
      else:
          return render_template(&quot;index.htm&quot;)
  
  main.run(debug=True)
  </code></pre>
  <p>I'm trying to use Flask and Serial-communication at the same time
  but This app can't find port7 assigned to Arduino
  a script related to Arduino works well without Flask</p>