AttributeError: 'list' object has no attribute 'tolist' Sea Level Predictor

Hi, everyone!

I have come across this error while testing the Sea Level Predictor assignment:

`ERROR: test_plot_lines (test_module.LinePlotTestCase)

Traceback (most recent call last):
File “/home/runner/boilerplate-sea-level-predictor/”, line 33, in test_plot_lines
actual =[0].get_ydata().tolist()
AttributeError: ‘list’ object has no attribute ‘tolist’`

It seems that the test module retrieves a list by assigning actual to[0].get_ydata() and it is impossible to apply tolist() function to it. But I have no idea why this happens.

Here’s my repl:

I’ll be glad for any help.

I have investigated this error some more. I found out that the get_ydata() function retrieves a list of 2 values: [0 , 1]

The test_module expects a list of many more values. I still don’t understand as the function get_lines() returns 2 x 2D lines. It seems that get_ydata() doesn’t retrieve all the values from those lines. Anybody knows why?