Issue 1:
Expected Behavior

Normally, the "app.run()" should go back and open the web server with the port number 3000.

from flask import Flask
app = Flask(__name__)

@app.route('/')
def index():
return 'Hello Flask'

app.run(port=3000)

Actual Behavior

Errors are occurring in "app.run()".

The same error occurs when using the debug tool in the visual studio code or the Python3 console window.

When using the debug tool in Visual Studio Code

When using the debug tool in IDLE

Traceback (most recent call last):
File "D:\Flask\start.py", line 8, in <module>
app.run(port=3000)
File "C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\flask\app.py", line 990, in run
run_simple(host, port, self, **options)
File "C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py", line 1052, in run_simple
inner()
File "C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py", line 996, in inner
srv = make_server(
File "C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py", line 847, in make_server
return ThreadedWSGIServer(
File "C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py", line 740, in __init__
HTTPServer.__init__(self, server_address, handler)
File "C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\socketserver.py", line 452, in __init__
self.server_bind()
File "C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\http\server.py", line 140, in server_bind
self.server_name = socket.getfqdn(host)
File "C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\socket.py", line 756, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte

Environment

Python version: v3.8.2

Flask version: v1.1.2

Werkzeug version: v1.0.1

Issue 2:
Expected Behavior

A normal python script with the starter code, wont run. I think that it's the library that causes the error.

Script:

from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello_world():
return 'Hello, World!'

if __name__ == "__main__":
app.run(host="0.0.0.0", port=8080, debug=True)

Actual Behavior

It crashed with this traceback

Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\werkzeug\serving.py", line 963, in inner
fd=fd,
File "C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\werkzeug\serving.py", line 806, in make_server
host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
File "C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\werkzeug\serving.py", line 699, in __init__
HTTPServer.__init__(self, server_address, handler)
File "C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py", line 452, in __init__
self.server_bind()
File "C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\http\server.py", line 139, in server_bind
self.server_name = socket.getfqdn(host)
File "C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\socket.py", line 676, in getfqdn
hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe6 in position 9: invalid continuation byte

Environment

Python version: Python 3.7.4

Flask version: 1.1.1

Werkzeug version: Don't know