amoussoubaruch opened a new issue #3635: MapBox with Druid don't work
URL: https://github.com/apache/incubator-superset/issues/3635
 
 
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [yes] I have checked the superset logs for python stacktraces and included 
it here as text if any
   - [yes] I have reproduced the issue with at least the latest released 
version of superset
   - [ yes] I have checked the issue tracker for the same issue and I haven't 
found one similar
   
   
   ### Superset version
   0.19.1
   
   ### Expected results
   I'm trying to use mapbox with superset. I start with postgresql table and 
mapbox work well.
   Now i save my data to druid datasource and get error below:
   
   
   ### Actual results
   TypeError: <superset.connectors.druid.models.DruidMetric object at 
0x7744950> is not JSON serializable
   
   ```
   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: <superset.connectors.druid.models.DruidMetric object at 
0x7744950> is not JSON serializable
   
   ```
   
   ### Steps to reproduce
   - add datasource to druid (host String, lat Float, Long Float)
   - Use superset mapbow
   
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to