Hello! I am new to Observable and following Shirly Wu tutorials from FrontEndMasters.
I have the following error (pls see the link to notebook), and not quite sure why as my code looks exactly the same as from the tutorials. I have imported the same libraries as well. I would really appreciate some help.
Welcome! Would you mind clicking âEnable link sharingâ in the menu on the upper right so that we can see your notebook?
Hereâs a notebook that covers how to do this:
Edit @bgchen was more welcoming, but he withdrew his post, so Iâll borrow his words.
Sorry about that. I just made it public.
Hi there,
I filed a suggestion for that notebook: https://observablehq.com/compare/a43840ac1251caac@30...5ca83610bb456ecf@33
What it looks like is that the notebook code is designed to work with a slightly different bit of data - the line d.Genre.split(', ')[0]
implies that d.Genre
is a string that youâll split on commas and take the first item from â but the JSON file you have here already has d.Genre
as an array, so .split()
isnât defined and hence the error. Pretty much the same thing with the imdbRating field - the code assumes that itâs a string that needs to be parsed into a number, but in the data youâre using, itâs already parsed into a number. Maybe this data is from a later step in the tutorial?