<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Normally, the "app.run()" should go back and open the web server with the port number 3000.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from flask import Flask
app = Flask(__name__)

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

app.run(port=3000)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">flask</span> <span class="pl-k">import</span> <span class="pl-v">Flask</span>
<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Flask</span>(<span class="pl-s1">__name__</span>)

<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">route</span>(<span class="pl-s">'/'</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">index</span>():
    <span class="pl-k">return</span> <span class="pl-s">'Hello Flask'</span>

<span class="pl-s1">app</span>.<span class="pl-en">run</span>(<span class="pl-s1">port</span><span class="pl-c1">=</span><span class="pl-c1">3000</span>)</pre></div>
<h3 dir="auto">Actual Behavior</h3>
<p dir="auto">Errors are occurring in "app.run()".<br>
The same error occurs when using the debug tool in the visual studio code or the Python3 console window.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16767890/96731602-673d0e00-13f2-11eb-8e0f-93aada6e2285.png"><img src="https://user-images.githubusercontent.com/16767890/96731602-673d0e00-13f2-11eb-8e0f-93aada6e2285.png" alt="Visual Studio Code traceback" style="max-width: 100%;"></a><br>
When using the debug tool in Visual Studio Code<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16767890/96731788-99e70680-13f2-11eb-8621-4fefce6d519b.png"><img src="https://user-images.githubusercontent.com/16767890/96731788-99e70680-13f2-11eb-8621-4fefce6d519b.png" alt="IDLE traceback" style="max-width: 100%;"></a><br>
When using the debug tool in IDLE</p>
<div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;D:\Flask\start.py&quot;, line 8, in &lt;module&gt;
    app.run(port=3000)
  File &quot;C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\flask\app.py&quot;, line 990, in run
    run_simple(host, port, self, **options)
  File &quot;C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py&quot;, line 1052, in run_simple
    inner()
  File &quot;C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py&quot;, line 996, in inner
    srv = make_server(
  File &quot;C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py&quot;, line 847, in make_server
    return ThreadedWSGIServer(
  File &quot;C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py&quot;, line 740, in __init__
    HTTPServer.__init__(self, server_address, handler)
  File &quot;C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\socketserver.py&quot;, line 452, in __init__
    self.server_bind()
  File &quot;C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\http\server.py&quot;, line 140, in server_bind
    self.server_name = socket.getfqdn(host)
  File &quot;C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\socket.py&quot;, line 756, in getfqdn
    hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte"><pre class="notranslate">Traceback (most recent call last):
  File <span class="pl-s">"D:\Flask\start.py"</span>, line <span class="pl-c1">8</span>, in <span class="pl-en">&lt;module&gt;</span>
    app.run(<span class="pl-v">port</span><span class="pl-k">=</span><span class="pl-c1">3000</span>)
  File <span class="pl-s">"C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\flask\app.py"</span>, line <span class="pl-c1">990</span>, in <span class="pl-en">run</span>
    run_simple(host, port, <span class="pl-c1">self</span>, <span class="pl-k">**</span>options)
  File <span class="pl-s">"C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py"</span>, line <span class="pl-c1">1052</span>, in <span class="pl-en">run_simple</span>
    inner()
  File <span class="pl-s">"C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py"</span>, line <span class="pl-c1">996</span>, in <span class="pl-en">inner</span>
    srv <span class="pl-k">=</span> make_server(
  File <span class="pl-s">"C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py"</span>, line <span class="pl-c1">847</span>, in <span class="pl-en">make_server</span>
    <span class="pl-k">return</span> ThreadedWSGIServer(
  File <span class="pl-s">"C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\site-packages\werkzeug\serving.py"</span>, line <span class="pl-c1">740</span>, in <span class="pl-en">__init__</span>
    HTTPServer.<span class="pl-c1">__init__</span>(<span class="pl-c1">self</span>, server_address, handler)
  File <span class="pl-s">"C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\socketserver.py"</span>, line <span class="pl-c1">452</span>, in <span class="pl-en">__init__</span>
    <span class="pl-c1">self</span>.server_bind()
  File <span class="pl-s">"C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\http\server.py"</span>, line <span class="pl-c1">140</span>, in <span class="pl-en">server_bind</span>
    <span class="pl-c1">self</span>.server_name <span class="pl-k">=</span> socket.getfqdn(host)
  File <span class="pl-s">"C:\Users\gunyu\AppData\Local\Programs\Python\Python38-32\lib\socket.py"</span>, line <span class="pl-c1">756</span>, in <span class="pl-en">getfqdn</span>
    hostname, aliases, ipaddrs <span class="pl-k">=</span> gethostbyaddr(name)
<span class="pl-en">UnicodeDecodeError</span>: <span class="pl-s">'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte</span></pre></div>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Python version: v3.8.2</li>
<li>Flask version: v1.1.2</li>
<li>Werkzeug version: v1.0.1</li>
</ul>
<h3 dir="auto">Expected Behavior</h3>

<p dir="auto">A normal python script with the starter code, wont run. I think that it's the library that causes the error.</p>
<p dir="auto">Script:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from flask import Flask

app = Flask(__name__)

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

if __name__ == &quot;__main__&quot;:
	app.run(host=&quot;0.0.0.0&quot;, port=8080, debug=True)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">flask</span> <span class="pl-k">import</span> <span class="pl-v">Flask</span>

<span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Flask</span>(<span class="pl-s1">__name__</span>)

<span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">route</span>(<span class="pl-s">'/'</span>)</span>
<span class="pl-k">def</span> <span class="pl-en">hello_world</span>():
    <span class="pl-k">return</span> <span class="pl-s">'Hello, World!'</span>

<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>:
	<span class="pl-s1">app</span>.<span class="pl-en">run</span>(<span class="pl-s1">host</span><span class="pl-c1">=</span><span class="pl-s">"0.0.0.0"</span>, <span class="pl-s1">port</span><span class="pl-c1">=</span><span class="pl-c1">8080</span>, <span class="pl-s1">debug</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)</pre></div>
<h3 dir="auto">Actual Behavior</h3>

<p dir="auto">It crashed with this traceback</p>
<div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Exception in thread Thread-1:
Traceback (most recent call last):
  File &quot;C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\threading.py&quot;, line 926, in _bootstrap_inner
    self.run()
  File &quot;C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\threading.py&quot;, line 870, in run
    self._target(*self._args, **self._kwargs)
  File &quot;C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\werkzeug\serving.py&quot;, line 963, in inner
    fd=fd,
  File &quot;C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\werkzeug\serving.py&quot;, line 806, in make_server
    host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
  File &quot;C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\werkzeug\serving.py&quot;, line 699, in __init__
    HTTPServer.__init__(self, server_address, handler)
  File &quot;C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py&quot;, line 452, in __init__
    self.server_bind()
  File &quot;C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\http\server.py&quot;, line 139, in server_bind
    self.server_name = socket.getfqdn(host)
  File &quot;C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\socket.py&quot;, line 676, in getfqdn
    hostname, aliases, ipaddrs = gethostbyaddr(name)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe6 in position 9: invalid continuation byte"><pre class="notranslate">Exception in thread Thread-1:
Traceback (most recent call last):
  File <span class="pl-s">"C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\threading.py"</span>, line <span class="pl-c1">926</span>, in <span class="pl-en">_bootstrap_inner</span>
    <span class="pl-c1">self</span>.run()
  File <span class="pl-s">"C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\threading.py"</span>, line <span class="pl-c1">870</span>, in <span class="pl-en">run</span>
    <span class="pl-c1">self</span>._target(<span class="pl-k">*</span><span class="pl-c1">self</span>._args, <span class="pl-k">**</span><span class="pl-c1">self</span>._kwargs)
  File <span class="pl-s">"C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\werkzeug\serving.py"</span>, line <span class="pl-c1">963</span>, in <span class="pl-en">inner</span>
    fd<span class="pl-k">=</span>fd,
  File <span class="pl-s">"C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\werkzeug\serving.py"</span>, line <span class="pl-c1">806</span>, in <span class="pl-en">make_server</span>
    host, port, app, request_handler, passthrough_errors, ssl_context, fd<span class="pl-k">=</span>fd
  File <span class="pl-s">"C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\werkzeug\serving.py"</span>, line <span class="pl-c1">699</span>, in <span class="pl-en">__init__</span>
    HTTPServer.<span class="pl-c1">__init__</span>(<span class="pl-c1">self</span>, server_address, handler)
  File <span class="pl-s">"C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py"</span>, line <span class="pl-c1">452</span>, in <span class="pl-en">__init__</span>
    <span class="pl-c1">self</span>.server_bind()
  File <span class="pl-s">"C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\http\server.py"</span>, line <span class="pl-c1">139</span>, in <span class="pl-en">server_bind</span>
    <span class="pl-c1">self</span>.server_name <span class="pl-k">=</span> socket.getfqdn(host)
  File <span class="pl-s">"C:\Users\fredr\AppData\Local\Programs\Python\Python37-32\lib\socket.py"</span>, line <span class="pl-c1">676</span>, in <span class="pl-en">getfqdn</span>
    hostname, aliases, ipaddrs <span class="pl-k">=</span> gethostbyaddr(name)
<span class="pl-en">UnicodeDecodeError</span>: <span class="pl-s">'utf-8' codec can't decode byte 0xe6 in position 9: invalid continuation byte</span></pre></div>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Python version: Python 3.7.4</li>
<li>Flask version: 1.1.1</li>
<li>Werkzeug version: Don't know</li>
</ul>