title: Why does Dash throw a TypeError when debugging through PyCharm?
body: <p>When I try to run a Dash app from PyCharm in debug mode I keep getting the below <code>TypeError</code>. What can I do to fix this so that I can break on breakpoints in PyCharm?</p>
  <p>I'm using: Dash 2.0.0, Python 3.9.6, PyCharm Community Edition 2021.1.3, Windows 10.</p>
  <pre><code>Connected to pydev debugger (build 212.4746.96)
  Traceback (most recent call last):
    File &quot;C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2021.1.3\plugins\python-ce\helpers\pydev\pydevd.py&quot;, line 1483, in _exec
      pydev_imports.execfile(file, globals, locals)  # execute the script
    File &quot;C:\Program Files (x86)\JetBrains\PyCharm Community Edition 2021.1.3\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py&quot;, line 18, in execfile
      exec(compile(contents+&quot;\n&quot;, file, 'exec'), glob, loc)
    File &quot;C:/redacted/dashboard/dashboard.py&quot;, line 170, in &lt;module&gt;
      _app = dash.Dash(__name__, external_stylesheets=[dbc.themes.DARKLY])
    File &quot;C:\redacted\.venv\lib\site-packages\dash\dash.py&quot;, line 304, in __init__
      self.server = flask.Flask(name) if server else None
    File &quot;C:\redacted\.venv\lib\site-packages\flask\app.py&quot;, line 406, in __init__
      instance_path = self.auto_find_instance_path()
    File &quot;C:\redacted\.venv\lib\site-packages\flask\app.py&quot;, line 638, in auto_find_instance_path
      prefix, package_path = find_package(self.import_name)
    File &quot;C:\redacted\.venv\lib\site-packages\flask\scaffold.py&quot;, line 850, in find_package
      package_path = _find_package_path(root_mod_name)
    File &quot;C:\redacted\.venv\lib\site-packages\flask\scaffold.py&quot;, line 801, in _find_package_path
      return os.path.dirname(next(iter(spec.submodule_search_locations)))
  TypeError: 'NoneType' object is not iterable
  python-BaseException
  
  Process finished with exit code 1
  </code></pre>
  <p>Here's how I've setup my PyCharm run configuration:</p>
  <p><a href="https://i.stack.imgur.com/ji8Ru.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ji8Ru.png" alt="enter image description here" /></a></p>