omejiasq commented on issue #7272: Mapbox data visualization doesn't work URL: https://github.com/apache/incubator-superset/issues/7272#issuecomment-611806698 Hi, when i try to use mapbox with latitud and longitud from a datasource for example CSV file or a database like postgres, i can fine the map when i create the chat. However, when i try to to get data with latitud and longitud from SQL lab, i get this error when i use the mapbox chart: Traceback (most recent call last): File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/views/base.py", line 120, in wraps return f(self, *args, **kwargs) File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/utils/decorators.py", line 69, in wrapper return f(*args, **kwargs) File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/views/core.py", line 1092, in explore_json viz_obj, csv=csv, query=query, results=results, samples=samples File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/views/core.py", line 1013, in generate_json payload = viz_obj.get_payload() File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/viz.py", line 381, in get_payload payload["data"] = self.get_data(df) File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/viz.py", line 2059, in get_data point_radius_col, File "/home/edgarubuntustudio/venv/lib/python3.6/site-packages/superset/viz.py", line 2055, in <listcomp> for lon, lat, metric, point_radius in zip( TypeError: type str doesn't define __round__ method Y try to cast the latitud and longitud in the SQl in SQL Lab of this ways, but i get the same error: 1. to_number(lat, '###,######') lat, to_number(lng, '###,######') lng, 2. cast(lat as decimal(28,6) ) lat, cast(lng as decimal(28,6) ) lng, 3. 5 lat, 5 lng Does anyone know how I can correct this? Regards,
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
