<h4 dir="auto">How to reproduce the bug</h4>
<ol dir="auto">
<li>Create dashboard with that structure:<br>
Three charts in three tabs, with three dashboard filters, each filter for own tab.<br>
Scope of filter 1 is for tab 1, scope of filter 2 is for tab 2 and scope of filter 3 is for tab 3.<br>
Save this dashboard by name "bug_report_20221220"</li>
</ol>
<p dir="auto">or (bestway)</p>
<p dir="auto">upload dashboard from file: <a href="https://drive.google.com/file/d/1lNKv9E-vifb-uwY438gcK-xHzPNF6Bs-/view?usp=sharing" rel="nofollow">dashboard_export_20221220T112259.zip</a><br>
Attention! used dataset "birth_names" from Examples</p>
<ol start="2" dir="auto">
<li>Go to "Dashboards" menu item of Superset.</li>
<li>Click to dashboard by name "bug_report_20221220"</li>
<li>You will see that charts in tabs don't display until you unfold out of scope filters.</li>
</ol>
<p dir="auto">Attention! You may need to open the dashboard "bug_report_20221220" twice to reproduce unexpected behavior.</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">Сharts in tabs will display without you unfold out of scope filters.</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">Сharts in tabs don't display until you unfold out of scope filters.</p>
<h4 dir="auto">Video of unexpected behavior.</h4>
<p dir="auto"><a href="https://drive.google.com/file/d/1xQRkUq1Nxe-Ra8lCTqg7cSBemgTBtCVi/view?usp=sharing" rel="nofollow">superset filters with charts in tabs bug.wmv</a></p>
<h3 dir="auto">Environment</h3>
<p dir="auto">Apache Superset in docker from <a href="https://hub.docker.com/r/apache/superset" rel="nofollow">https://hub.docker.com/r/apache/superset</a> latest version on 2022-12-20.</p>
<p dir="auto">Make sure these boxes are checked 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 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">Superset version</h3>
<p dir="auto">0.15.4 on python3.4.5</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">Async query succeeds; fetch results succeeds and shows result table.</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">Async queries result in an error in the superset worker:<br>
<code class="notranslate">"TypeError: 'str' does not support the buffer interface"</code></p>
<p dir="auto">This seems to be caused by python3 which requires the payload to be encoded.<br>
For testing, I did the following adjustments which seem to do the job:</p>
<p dir="auto">File sql_lab.py:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#results_backend.set(key, zlib.compress(payload))  
results_backend.set(key, zlib.compress(payload.encode('utf-8')))  "><pre class="notranslate"><code class="notranslate">#results_backend.set(key, zlib.compress(payload))  
results_backend.set(key, zlib.compress(payload.encode('utf-8')))  
</code></pre></div>
<p dir="auto">File views.py:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#json_payload = zlib.decompress(blob)
json_payload = zlib.decompress(blob).decode('utf-8')"><pre class="notranslate"><code class="notranslate">#json_payload = zlib.decompress(blob)
json_payload = zlib.decompress(blob).decode('utf-8')
</code></pre></div>
<h3 dir="auto">Steps to reproduce</h3>
<ol start="0" dir="auto">
<li>Have a redis server running.</li>
<li>Install superset on python3 with celery[redis] and redis,</li>
<li>activate them in the config:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class CeleryConfig(object):
  BROKER_URL = 'redis://localhost:6379/0'
  CELERY_IMPORTS = ('superset.sql_lab', )
  CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
  CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
CELERY_CONFIG = CeleryConfig

from werkzeug.contrib.cache import RedisCache
RESULTS_BACKEND = RedisCache(host='localhost', port=6379, password=None, db=0, default_timeout=300, key_prefix='cel_result')"><pre class="notranslate"><code class="notranslate">class CeleryConfig(object):
  BROKER_URL = 'redis://localhost:6379/0'
  CELERY_IMPORTS = ('superset.sql_lab', )
  CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
  CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}}
CELERY_CONFIG = CeleryConfig

from werkzeug.contrib.cache import RedisCache
RESULTS_BACKEND = RedisCache(host='localhost', port=6379, password=None, db=0, default_timeout=300, key_prefix='cel_result')
</code></pre></div>
<ol start="3" dir="auto">
<li>Start superset server and worker</li>
<li>Run async query in SQL-Lab and fetch results</li>
</ol>
<h3 dir="auto">Questions</h3>
<p dir="auto">Supposing, my adjustments for python3 are the right means for fixing the issue, I got the following questions:<br>
a. Are there more than these two locations where we need to encode a string? Can anyone point me there?<br>
b. What is the right way to fix this python3-specific issue so that we do not compromise python2 installations? (I have absolutely no experience in this regard…)<br>
c. I'm also not experienced with github and pull requests. Should I still try to fix it myself? I'm perfectly fine if someone else wants to deal with this issue. However, if needed, I can try to make a pull request.</p>