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

Druid Datasource-IndexError: list index out of range #358

Closed
vinjadhav opened this issue Apr 15, 2016 · 11 comments
Closed

Druid Datasource-IndexError: list index out of range #358

vinjadhav opened this issue Apr 15, 2016 · 11 comments
Labels
validation:required A committer should validate the issue

Comments

@vinjadhav
Copy link

I have installed caravel version 9.0 and have configured it for druid cluster. I have ingested sample wikiticker and metrics data in druid and able to see these data sources after clicking refresh metadata in caravel.
But when i click on any of these data sources i get the error. "IndexError: list index out of range"

@weand
Copy link

weand commented Apr 15, 2016

Same with caravel 0.8.7 + mysql and sample data imported.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
    return f(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/caravel/models.py", line 1162, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/caravel/views.py", line 493, in explore
    slice_=slc)
  File "/usr/local/lib/python2.7/dist-packages/caravel/viz.py", line 59, in __init__
    ff = FormFactory(self)
  File "/usr/local/lib/python2.7/dist-packages/caravel/forms.py", line 115, in __init__
    default_metric = datasource.metrics_combo[0][0]
IndexError: list index out of range

@weand
Copy link

weand commented Apr 15, 2016

ok, error traced to the cause, that

  1. there were no columns created for all imported tables.
  2. when clicking the SQL link on one of the table following exception error is shown

OperationalError: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'root'@'127.0.0.1' (using password: NO)")

Our DB Connection uses authentication, something like
mysql://user:password@localhost:3306/caravel

As

  • the password is entered and displayed correctly in the Data Source configuration
  • and connection test on the data source is also working

    there seems to be a problem with password in the database

Not sure if relevant: The 'password' column in the 'dbs' table is NULL.

@mistercrunch
Copy link
Member

@weand your error is related to not having any metrics defined for that table, maybe the examples didn't get loaded properly?

@polomarcus
Copy link

polomarcus commented Apr 15, 2016

I have the same error when clicking on recently added Druid's datasources for Druid: 0.9 and the lastest caravel version

http://localhost:8088/caravel/explore/druid/2/ gives me :

IndexError
IndexError: list index out of range
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/pyrthon2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
return f(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/caravel/models.py", line 1164, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/caravel/views.py", line 496, in explore
slice_=slc)
File "/usr/local/lib/python2.7/dist-packages/caravel/viz.py", line 59, in __init__
ff = FormFactory(self)
File "/usr/local/lib/python2.7/dist-packages/caravel/forms.py", line 115, in __init__
default_metric = datasource.metrics_combo[0][0]
IndexError: list index out of range

EDIT: I refresh my Druid's 0.9 datasources this morning, and everything was OK 👍 I guess something was initializing on the Druid side

@mistercrunch
Copy link
Member

mistercrunch commented Apr 16, 2016

We're still on 0.8.* here, not sure how to test or reproduce, I'll ask around as we may have a test cluster for 0.9.

FYI for realtime, we use the same configuration files that defines the spark-streaming configuration to generate dynamically into Caravel's datasource definition. (I just want to highlight that it's possible to push the conf into Caravel, at least until 0.9's api settles or gets implemented on the Caravel side)

@vinjadhav
Copy link
Author

@mistercrunch i had tried earlier on 0.8.3 but i could get the same error. so i moved to 0.9.0 but facing same error...
I there any configuration i need to carry out on druid or caravel side to get metrics and dimensions of druid datasource in caravel. I used druid quickstart examples of "wikiticker" and "metrics"

@polomarcus
Copy link

@mistercrunch I refresh my Druid's 0.9 datasources this morning, and everything was OK 👍 I guess something was initializing on the Druid side.

For information, Druid was launched and dealing with 10K events per seconds for several hours before I installed Caravel

@mistercrunch
Copy link
Member

I think there may be a bug on the first pass of the script that gets ironed out by subsequent passes. We need to write unit tests for Druid but for them to work on travis we need to mock the PyDruid client. I'm hoping we can work on this sometime soon.

@deyani27
Copy link

Using Caravel-0.8.8 to connect with a DRUID cluster. Once I click on any of the table , getting the below error.
I tried refreshing the database several times, but still the error is present.

http://localhost:8088/caravel/explore/druid/2/

IndexError: list index out of range
Traceback (most recent call last)

    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__

    return self.wsgi_app(environ, start_response)

    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app

    response = self.make_response(self.handle_exception(e))

    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception

    reraise(exc_type, exc_value, tb)

    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app

    response = self.full_dispatch_request()

    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request

    rv = self.handle_user_exception(e)

    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception

    reraise(exc_type, exc_value, tb)

    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request

    rv = self.dispatch_request()

    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request

    return self.view_functions[rule.endpoint](**req.view_args)

    File "/usr/local/lib/python2.7/site-packages/flask_appbuilder/security/decorators.py", line 26, in wraps

    return f(self, *args, **kwargs)

    File "/Users/anindit/Downloads/caravel-master/caravel/models.py", line 1156, in wrapper

    return f(*args, **kwargs)

    File "/Users/anindit/Downloads/caravel-master/caravel/views.py", line 481, in explore

    slice_=slc)

    File "/Users/anindit/Downloads/caravel-master/caravel/viz.py", line 59, in __init__

    ff = FormFactory(self)

    File "/Users/anindit/Downloads/caravel-master/caravel/forms.py", line 115, in __init__

    default_metric = datasource.metrics_combo[0][0]

    IndexError: list index out of range

@luchuan
Copy link
Contributor

luchuan commented Apr 22, 2016

got the same problem

@xrmx
Copy link
Contributor

xrmx commented Aug 9, 2016

Is this still an issue?

@xrmx xrmx added druid validation:required A committer should validate the issue labels Aug 9, 2016
@xrmx xrmx closed this as completed Sep 17, 2016
graceguo-supercat pushed a commit to graceguo-supercat/superset that referenced this issue Oct 4, 2021
…ngs (apache#358)

* fix: type warnings for formatters

* docs: add comment

* fix: unit tests

* fix: type

* feat: make time formatter handle timestamp
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
…ngs (apache#358)

* fix: type warnings for formatters

* docs: add comment

* fix: unit tests

* fix: type

* feat: make time formatter handle timestamp
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
Bumps [@vx/scale](https://github.com/hshoff/vx) from 0.0.192 to 0.0.194.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.192...v0.0.194)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
…ngs (apache#358)

* fix: type warnings for formatters

* docs: add comment

* fix: unit tests

* fix: type

* feat: make time formatter handle timestamp
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
Bumps [@vx/scale](https://github.com/hshoff/vx) from 0.0.192 to 0.0.194.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.192...v0.0.194)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
…ngs (apache#358)

* fix: type warnings for formatters

* docs: add comment

* fix: unit tests

* fix: type

* feat: make time formatter handle timestamp
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
Bumps [@vx/scale](https://github.com/hshoff/vx) from 0.0.192 to 0.0.194.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.192...v0.0.194)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
…ngs (apache#358)

* fix: type warnings for formatters

* docs: add comment

* fix: unit tests

* fix: type

* feat: make time formatter handle timestamp
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
Bumps [@vx/scale](https://github.com/hshoff/vx) from 0.0.192 to 0.0.194.
- [Release notes](https://github.com/hshoff/vx/releases)
- [Changelog](https://github.com/hshoff/vx/blob/master/CHANGELOG.md)
- [Commits](airbnb/visx@v0.0.192...v0.0.194)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation:required A committer should validate the issue
Projects
None yet
Development

No branches or pull requests

7 participants