Can somebody help?

Hello all,

I am quite stuck in this one:

And I don’t really understand why.

TypeErrorTraceback (most recent call last)
in ()
2 from csv import reader
3 read_file = reader(opened_file)
----> 4 apps_data = list(read_file)
6 def extract(data_set, index):

TypeError: ‘list’ object is not callable

I don’t think I know how to fix this. Can somebody help?

Hi @didacdfg. This is a common problem that pops up! Check out this post to learn about the “‘x’ object is not callable” problem and how to fix it.

Hello april,

I understand that kind of error when it happens with the type of data you are trying to call.

However, it is happening when trying to call the list imported for the exercise, and it is supposed to be a list. So it does not make much sense to me (?)

I might be wrong since I am quite new learning python.


Sorry that this is confusing! The list() function you’re trying to use to turn the data into a list is not working as intended. Python is giving an error message because at some point list was overwritten as a variable (it could have occurred on a previous screen, maybe putting something like list = [1, 2, 3]). You can fix this within the code window with these steps:

  1. enter del list in the code window and hit the run code button. This will delete the list variable (you can put this at the beginning of the code, or by itself)
  2. try to run your code again

What that should do is delete the variable instance of list and restore original list() to use.