<p dir="auto">I installed Superset 2.0.0 via pip. I get the following error when running <code class="notranslate">superset</code> after installation:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ superset
...
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'"><pre class="notranslate">$ <span class="pl-s1">superset</span>
<span class="pl-c1">...</span>
<span class="pl-c1">ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'</span></pre></div>
<h4 dir="auto">How to reproduce the bug</h4>
<p dir="auto">I installed Superset via pip in a clean Python 3.8 virtual environment on Linux:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ mkdir superset-2.0.0
$ cd superset-2.0.0
$ python3.8 -m venv venv
$ source ./venv/bin/activate
$ pip install --upgrade setuptools pip wheel
$ pip install apache-superset==2.0.0
$ pip install pillow mysqlclient gevent
$ vim superset_config.py
$ export PYTHONPATH=/home/superset/superset-2.0.0
$ export FLASK_APP=superset
$ superset
...
ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'"><pre class="notranslate">$ <span class="pl-s1">mkdir superset-2.0.0</span>
$ <span class="pl-s1"><span class="pl-c1">cd</span> superset-2.0.0</span>
$ <span class="pl-s1">python3.8 -m venv venv</span>
$ <span class="pl-s1"><span class="pl-c1">source</span> ./venv/bin/activate</span>
$ <span class="pl-s1">pip install --upgrade setuptools pip wheel</span>
$ <span class="pl-s1">pip install apache-superset==2.0.0</span>
$ <span class="pl-s1">pip install pillow mysqlclient gevent</span>
$ <span class="pl-s1">vim superset_config.py</span>
$ <span class="pl-s1"><span class="pl-k">export</span> PYTHONPATH=/home/superset/superset-2.0.0</span>
$ <span class="pl-s1"><span class="pl-k">export</span> FLASK_APP=superset</span>
$ <span class="pl-s1">superset</span>
<span class="pl-c1">...</span>
<span class="pl-c1">ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'</span></pre></div>
<h3 dir="auto">Expected results</h3>
<p dir="auto">Superset runs without error.</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">Superset crashes with Python <code class="notranslate">ModuleNotFoundError</code>.</p>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>superset version: Superset 2.0.0</li>
<li>python version: Python 3.8.10</li>
</ul>
<h3 dir="auto">Checklist</h3>
<p dir="auto">Make sure to follow these steps before submitting your issue - thank you!</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li>
</ul>
<h3 dir="auto">Additional Information</h3>
<p dir="auto">I notice that <code class="notranslate">requirements/base.txt</code> lists <code class="notranslate">werkzeug==2.0.3</code> so I installed that manually and superset runs fine after.</p>
<p dir="auto"><strong>Is your feature request related to a problem? Please describe.</strong><br>
My problem arises when I want to create a chart that responds to filters in the dashboard in a customized way, making use of the templating engine and the filter_values() function.<br>
I usually know what SQL query I need, so I go to SQL Lab, write the query with the filter_values() function already included, and... no values are returned. I can't "explore" the results and create my chart!<br>
What I usually do (which is what frustrates me) is: I create a version of the query which returns some results (with placeholder values for the filters), and then in the chart I edit my datasource and add all the filter_values() lines.</p>
<p dir="auto"><strong>Describe the solution you'd like</strong><br>
I would like it to be possible to add datasources directly from SQL code, with a better interface for changing these datasources (currently it's a tiny text box when I click the grey Datasource box in the Chart tab).<br>
I would also like to be able to name these datasources something other than <em>null.my_username-query_name-random_string</em>.</p>
<p dir="auto"><strong>Describe alternatives you've considered</strong><br>
An alternative would be allowing the user to "explore" queries that return no results directly from SQL Lab, because queries with the filter_values() function can only ever return results when inside a dashboard with the respective filters.</p>
<p dir="auto"><strong>Additional context</strong><br>
None.</p>