Setting the line is not working

Hi all, I’m new to plotly. When I try to run some examples, it throws me an error. image

I was looking for another solution and visit official documentation on plotly itself but it should be working fine cause setting the line is involving dict. That’s why I’m confusing for. I would like to know from others opinion if something that I’ve been missing