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 read property 'map' of null #53

Open
a-w-1806 opened this issue Jul 29, 2018 · 3 comments
Open

Cannot read property 'map' of null #53

a-w-1806 opened this issue Jul 29, 2018 · 3 comments

Comments

@a-w-1806
Copy link

Hi!
When I right click on a .csv file in the Files and choose Open with->Voyager I get :

localhost:8888 says Cannot read property 'map' of null

The voyage window opens up but it seems not read in any data at all.
But when I do the same to a .json file, the voyage window opens up without the error message but still no data is loaded.

My OS: Linux Mint
Chrome: 68.0.3440.75
node -v:v8.10.0

Thanks in advance!

@zzhangjii
Copy link
Collaborator

Thx for reporting this issue!
It looks like a file content reading error. For local file, the content reading process relies on "read" method from vega-loader(). It loads the content into strings and process them with different delimiters based on different file types. Therefore, to use this method properly, we have to make sure the file contents strictly match the file type.

Those errors are likely to be caused by file type&content conflicts. You may obtain and test some more files from here (https://vega.github.io/vega-lite/examples/bar.html) to see if it's the case.

@a-w-1806
Copy link
Author

a-w-1806 commented Aug 7, 2018

Thanks for your reply!
I play around with it and finally find out the reason.
My .csv file's first column is index column and it does not have a header name. So that element of the header line is simply blank. After I fill some text to it and reload the data, it works.
Is it an issue you can fix? Thanks!

@zzhangjii
Copy link
Collaborator

Thanks for sharing the info.
I can't really change the "read" method there, but I will try some other ways to see if it can help.

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