Comments (8)
+1
from superset.
"GET /caravel/explore/druid/2/?viz_type=table&granularity=one+day&since=7+days+ago&until=1+day+ago&row_limit=5000&include_search=false&metrics=count&flt_col_0=country_woeid&flt_op_0=in&flt_eq_0=&slice_id=&slice_name=&collapsed_fieldsets=&action=&datasource_name=fact_supply_xd&datasource_id=2&datasource_type=druid&previous_viz_type=table&json=true&force=true HTTP/1.1" 500 -
from superset.
Ok found the fix but still trying to figure out the issue
the fix is this - when you refresh metadata, the data source you are querying against needs to have cache timeout in the settings in the UI.
If the field is left blank - then we get an error : i.e AttributeError: 'DruidDatasource' object has no attribute 'database'
I even included the field in caravel_config.py like CACHE_DEFAULT_TIMEOUT=6000 but that didn't help either. The UI needs to have that field otherwise we get an exception here:
https://github.com/airbnb/caravel/blob/master/caravel/viz.py#L225
the code goes into this if else condition (when the field is left blank): https://github.com/airbnb/caravel/blob/master/caravel/viz.py#L235
from superset.
@mistercrunch I fixed the issue. I will send the PR asap
from superset.
from superset.
Stack Trace:
Traceback (most recent call last):
File "/home/y/lib/python2.7/site-packages/caravel/views.py", line 446, in explore
payload = obj.get_json()
File "/home/y/lib/python2.7/site-packages/caravel/viz.py", line 270, in get_json
cache.set(cache_key, payload, timeout=self.cache_timeout)
File "/home/y/lib/python2.7/site-packages/caravel/viz.py", line 223, in cache_timeout
self.datasource.database.cache_timeout or
AttributeError: 'DruidDatasource' object has no attribute 'database'
2016-03-29 20:42:21,432:INFO:werkzeug:66.228.162.48 - - [29/Mar/2016 20:42:21] "GET /caravel/explore/druid/2/?viz_type=table&granularity=one+day&since=7+days+ago&until=now&row_limit=5000&include_search=false&metrics=count&flt_col_0=country_woeid&flt_op_0=in&flt_eq_0=&slice_id=&slice_name=&collapsed_fieldsets=&action=&datasource_name=fact_supply_xd&datasource_id=2&datasource_type=druid&previous_viz_type=table&json=true&force=true HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/y/lib/python2.7/site-packages/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/home/y/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/y/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/y/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/y/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/y/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/y/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/y/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/y/lib/python2.7/site-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
return f(self, _args, *_kwargs)
File "/home/y/lib/python2.7/site-packages/caravel/models.py", line 1113, in wrapper
return f(_args, *_kwargs)
File "/home/y/lib/python2.7/site-packages/caravel/views.py", line 451, in explore
raise e
AttributeError: 'DruidDatasource' object has no attribute 'database'
from superset.
obj.get_json() throws an exception if cache timeout is not specified in the UI
from superset.
This is now fixed in master
please confirm
from superset.
Related Issues (20)
- Report&Alert Format HOT 4
- Error warming up cache: Error 302 HOT 4
- 🐛 Assigning roles to users lead to integrity error message HOT 4
- Error on embedded dashboard after upgrading to 3.1.1: "Guest user cannot modify chart payload" HOT 44
- Update dependencies in superset-frontend package.json HOT 1
- SDK for Embedding dashboards
- [SIP] Ability to assign a unique asset id to a superset dashboard / visual
- Inter font chosen in Table does not allow correct alignment of dates and numbers
- Superset 2.x: `AttributeError: module 'flask.json' has no attribute 'JSONEncoder'`
- Dashboard Filter Side HOT 1
- frontend-check build failures for branches HOT 1
- report exception (email-chart-text)
- Bulk delete charts pagination disappeared
- superset 2.1.0 frontend start to use the "npm run dev-server", will appear many warnings HOT 1
- custom SQL aliases in raw records are not being used as column labels in chart HOT 1
- Radar Chart label color accessibility HOT 2
- Official Steps Keep Failing for Docker-compose on ARM Mac
- error loading the tables HOT 1
- Cumsum treats null values as zeros
- Server-side session cookie is set for each healthcheck (request to /health) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superset.