<p dir="auto">Make sure these boxes are checked before submitting your issue - thank you!</p>
<ul dir="auto">
<li>[yes] I have checked the superset logs for python stacktraces and included it here as text if any</li>
<li>[yes] I have reproduced the issue with at least the latest released version of superset</li>
<li>[ yes] 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.19.1</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">I'm trying to use mapbox with superset. I start with postgresql table and mapbox work well.<br>
Now i save my data to druid datasource and get error below:</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">TypeError: &lt;superset.connectors.druid.models.DruidMetric object at 0x7744950&gt; is not JSON serializable</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;/usr/lib/python2.7/site-packages/superset/viz.py&quot;, line 249, in get_payload
    df = self.get_df()
  File &quot;/usr/lib/python2.7/site-packages/superset/viz.py&quot;, line 79, in get_df
    self.results = self.datasource.query(query_obj)
  File &quot;/usr/lib/python2.7/site-packages/superset/connectors/druid/models.py&quot;, line 971, in query
    client=client, query_obj=query_obj, phase=2)
  File &quot;/usr/lib/python2.7/site-packages/superset/connectors/druid/models.py&quot;, line 799, in get_query_str
    return self.run_query(client=client, phase=phase, **query_obj)
  File &quot;/usr/lib/python2.7/site-packages/superset/connectors/druid/models.py&quot;, line 962, in run_query
    client.groupby(**qry)
  File &quot;/usr/lib/python2.7/site-packages/pydruid/client.py&quot;, line 192, in groupby
    return self._post(query)
  File &quot;/usr/lib/python2.7/site-packages/pydruid/client.py&quot;, line 391, in _post
    headers, querystr, url = self._prepare_url_headers_and_body(query)
  File &quot;/usr/lib/python2.7/site-packages/pydruid/client.py&quot;, line 34, in _prepare_url_headers_and_body
    querystr = json.dumps(query.query_dict).encode('utf-8')
  File &quot;/usr/lib64/python2.7/json/__init__.py&quot;, line 243, in dumps
    return _default_encoder.encode(obj)
  File &quot;/usr/lib64/python2.7/json/encoder.py&quot;, line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File &quot;/usr/lib64/python2.7/json/encoder.py&quot;, line 270, in iterencode
    return _iterencode(o, 0)
  File &quot;/usr/lib64/python2.7/json/encoder.py&quot;, line 184, in default
    raise TypeError(repr(o) + &quot; is not JSON serializable&quot;)
TypeError: &lt;superset.connectors.druid.models.DruidMetric object at 0x7744950&gt; is not JSON serializable
"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/superset/viz.py", line 249, in get_payload
    df = self.get_df()
  File "/usr/lib/python2.7/site-packages/superset/viz.py", line 79, in get_df
    self.results = self.datasource.query(query_obj)
  File "/usr/lib/python2.7/site-packages/superset/connectors/druid/models.py", line 971, in query
    client=client, query_obj=query_obj, phase=2)
  File "/usr/lib/python2.7/site-packages/superset/connectors/druid/models.py", line 799, in get_query_str
    return self.run_query(client=client, phase=phase, **query_obj)
  File "/usr/lib/python2.7/site-packages/superset/connectors/druid/models.py", line 962, in run_query
    client.groupby(**qry)
  File "/usr/lib/python2.7/site-packages/pydruid/client.py", line 192, in groupby
    return self._post(query)
  File "/usr/lib/python2.7/site-packages/pydruid/client.py", line 391, in _post
    headers, querystr, url = self._prepare_url_headers_and_body(query)
  File "/usr/lib/python2.7/site-packages/pydruid/client.py", line 34, in _prepare_url_headers_and_body
    querystr = json.dumps(query.query_dict).encode('utf-8')
  File "/usr/lib64/python2.7/json/__init__.py", line 243, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib64/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib64/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib64/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: &lt;superset.connectors.druid.models.DruidMetric object at 0x7744950&gt; is not JSON serializable

</code></pre></div>
<h3 dir="auto">Steps to reproduce</h3>
<ul dir="auto">
<li>add datasource to druid (host String, lat Float, Long Float)</li>
<li>Use superset mapbow</li>
</ul>
<p dir="auto">Make sure these boxes are checked before submitting your issue - thank you!</p>
<ul dir="auto">
<li>[yes ] I have checked the superset logs for python stacktraces and included it here as text if any</li>
<li>[yes ] I have reproduced the issue with at least the latest released version of superset</li>
<li>[yes ] 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.19.1</p>
<h3 dir="auto">Expected results</h3>
<p dir="auto">I try to draw mapbox in superset. I have dataset with column Latitude and Longitude and use it in respective field.</p>
<h3 dir="auto">Actual results</h3>
<p dir="auto">TypeError: &lt;superset.connectors.druid.models.DruidMetric object at 0xefbea90&gt; is not JSON serializable</p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/13684386/31226202-8d89286c-a9d5-11e7-8d8b-eb7e9d6c4d77.png"><img src="https://user-images.githubusercontent.com/13684386/31226202-8d89286c-a9d5-11e7-8d8b-eb7e9d6c4d77.png" alt="togithub" style="max-width: 100%;"></a></p>
<p dir="auto">Anyone  already have the same problem?<br>
Thanks</p>