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

'str' object has no attribute 'items' when visualising Vega plot of network using Panel #886

Closed
jandot opened this issue Dec 18, 2019 · 0 comments · Fixed by #889
Closed
Labels
TRIAGE Default label for untriaged issues

Comments

@jandot
Copy link

jandot commented Dec 18, 2019

When running pn.pane.Vega(spec) on a network spec (from the vega example showing a force-directed network of the Miserables characters), I get an error in line 21 of the pane.py source file. The error:

~/anaconda3/envs/i0u19a_jupyter/lib/python3.7/site-packages/panel/pane/vega.py in ds_as_cds(dataset)
     19     if len(dataset) == 0:
     20         return {}
---> 21     data = {k: [] for k, v in dataset[0].items()}
     22     for item in dataset:
     23         for k, v in item.items():

AttributeError: 'str' object has no attribute 'items'

See the image for a screenshot of the complete error message. The command used was pn.pane.Vega(spec), the error what is shown above, and the output was Vega(dict).

Image 2: Bug after pn.pane.Vega(spec)

@jandot jandot added the TRIAGE Default label for untriaged issues label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TRIAGE Default label for untriaged issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant