Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Index out of range with 'Vega.tabular_data()' and pd.DateTimeIndex #38

Closed
garaud opened this issue Jul 3, 2013 · 2 comments
Closed

Comments

@garaud
Copy link
Contributor

garaud commented Jul 3, 2013

Hi,

Commit 5200e3d seems introduce the error in the method update_component at the line:

parameter = getattr(self, parameter)[index]

when parameter is 'scales for instance, it can be an empty list. This happens when the data passed to the tabular_data has a pandas.DateTimeIndex (see the inner function period_axis).

I'm trying to write a test case for this.

Best regards,
Damien G.

@garaud
Copy link
Contributor Author

garaud commented Jul 3, 2013

See garaud@c63b48e

Missing the related assert, but it reproduces the problem.

wrobstory added a commit that referenced this issue Jul 3, 2013
…mpty list, rather than erroring out on the index
@wrobstory
Copy link
Owner

Nice bug! The problem is that update_component was trying to index an empty list, because no scale component had been defined yet. Commit c59cf39 should fix- let me know if you're still having problems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants