"parse_data_from_file" step

Hi, can I send my code directly to Mentor for help please? I have spent far too long and much too many trial attempts at this step, read all the associated forum Q &As multiple times, checked Stack Overflow, and altered my code accordingly several times.

The various errors generated through several trials include
“TypeError: list indices must be integers or slices, not tuple”,
“AttributeError: ‘_csv.reader’ object has no attribute ‘append’”,
“AttributeError: ‘_csv.reader’ object has no attribute ‘lower’”,

Thanks.

Right, reading into your errors I can tell you what they mean and maybe you can try again to fix the issues.

TypeError: list indices must be integers or slices, not tuple”, - here the error says that you are using a tuple to index a list, its maybe you are doing something like list(0) , it needs to be list[0] or even you might be using list[(0)], needs be list[0].

“AttributeError: ‘_csv.reader’ object has no attribute ‘append’”,-here i think when you are reading the csv file you are not storing the data in a list first and then using append on the list.

“AttributeError: ‘_csv.reader’ object has no attribute ‘lower’”, - it probably as above but also you might be using a method which is not right for that data type.

These are basic errors, you need to understand and fix them out yourself, it will help you.

Hi Gent,

Thanks for your reply.

The number of hours I’ve spent on it, basic or not, I am not going to be able to fix it without help.

Send it over to me as a privare message but it make some time to have a close look at it. I am very busy right now…

Worked finally.

Many thanks.

1 Like