Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create pie chart when there is no date column in the table #1689

Closed
maver1ck opened this issue Nov 25, 2016 · 1 comment
Closed

Cannot create pie chart when there is no date column in the table #1689

maver1ck opened this issue Nov 25, 2016 · 1 comment

Comments

@maver1ck
Copy link
Contributor

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.13.2

Actual results

2016-11-25 14:23:22,778:ERROR:root:local variable 'dttm_col' referenced before assignment
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/superset/views.py", line 1277, in explore_json
    payload = viz_obj.get_json()
  File "/usr/local/lib/python3.4/dist-packages/superset/viz.py", line 324, in get_json
    'data': self.get_data(),
  File "/usr/local/lib/python3.4/dist-packages/superset/viz.py", line 1234, in get_data
    df = self.get_df()
  File "/usr/local/lib/python3.4/dist-packages/superset/viz.py", line 1226, in get_df
    df = super(DistributionPieViz, self).get_df(query_obj)
  File "/usr/local/lib/python3.4/dist-packages/superset/viz.py", line 169, in get_df
    self.results = self.datasource.query(**query_obj)
  File "/usr/local/lib/python3.4/dist-packages/superset/models.py", line 1103, in query
    inner_time_filter = dttm_col.get_time_filter(
UnboundLocalError: local variable 'dttm_col' referenced before assignment

Steps to reproduce

Create pie chart for table without date column.

Hint: you can do this with sunburst diagram.

@spspaul
Copy link

spspaul commented Nov 27, 2016

For the record, I got the same exception when I updated from:

%> pip show caravel
---
Metadata-Version: 1.1
Name: caravel
Version: 0.11.0

to

%> pip show superset 2>&1 | head -2
Name: superset
Version: 0.13.2

Once I provided a value for Time Column in the Slice definition
using the Distribution - NVD3 - Pie Chart widget, it started working again.

mistercrunch added a commit to mistercrunch/superset that referenced this issue Nov 28, 2016
mistercrunch added a commit that referenced this issue Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants