<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">If I active debug mode the program fails as is shown below. However with deactivated debug mode the program runs fine.</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__ == '__main__':
    app.run()"><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>()</pre></div>
<h3 dir="auto">Actual Behavior</h3>
<div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="* Serving Flask app &quot;flask_hello_world&quot;
 * Forcing debug mode on
 * Restarting with stat
  File &quot;C:\Users\Tim\Anaconda3\envs\flaskr\Scripts\flask.exe&quot;, line 1
SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Users\Tim\Anaconda3\envs\flaskr\Scripts\flask.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details"><pre class="notranslate">* Serving Flask app "flask_hello_world"
 * Forcing debug mode on
 * Restarting with stat
  File <span class="pl-s">"C:\Users\Tim\Anaconda3\envs\flaskr\Scripts\flask.exe"</span>, line <span class="pl-c1">1</span>
<span class="pl-en">SyntaxError</span>: <span class="pl-s">Non-UTF-8 code starting with '\x90' in file C:\Users\Tim\Anaconda3\envs\flaskr\Scripts\flask.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details</span></pre></div>
<h3 dir="auto">Environment</h3>
<p dir="auto">I am running it on Windows 10. Python and packages are installed through Anaconda.</p>
<ul dir="auto">
<li>Python version: 3.6</li>
<li>Flask version: 0.12.2</li>
<li>Werkzeug version: 12.2</li>
</ul>
<p dir="auto">I am running apistar on python 3 and encountering an issue that has lead me to the werkzeug reloader.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(fresh) C:\Users\uskaxb07\PycharmProjects\testapi&gt;apistar run
Starting up...
 * Restarting with stat
  File &quot;C:\Users\uskaxb07\env\fresh\Scripts\apistar.exe&quot;, line 1
SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Users\uskaxb07\env\fresh\Scripts\apistar.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details"><pre class="notranslate"><code class="notranslate">(fresh) C:\Users\uskaxb07\PycharmProjects\testapi&gt;apistar run
Starting up...
 * Restarting with stat
  File "C:\Users\uskaxb07\env\fresh\Scripts\apistar.exe", line 1
SyntaxError: Non-UTF-8 code starting with '\x90' in file C:\Users\uskaxb07\env\fresh\Scripts\apistar.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
</code></pre></div>
<p dir="auto">Removing the <code class="notranslate">use_reloader</code>  from the call to<code class="notranslate"> run_simple()</code> works. After digging into a couple of comments I found  that <a href="https://github.com/pallets/werkzeug/blob/master/werkzeug/_reloader.py#L118">https://github.com/pallets/werkzeug/blob/master/werkzeug/_reloader.py#L118</a> is doing some encoding to latin1 but only when the os is windows and the python version is 2. Could this be causing the Non-UTF-8 Syntax Error that I am recieving in python3?</p>