I'm curious why does not Python specifies errors more deeply? I'm getting this error right now.
firms[i]['predmet_podnikania']=firms[i]['predmet_podnikania'][:-1]+[firms[i]['predmet_podnikania'][-1]+line]
IndexError: list index out of range
Ok, I get that I'm trying to access some list on highest index than the maximum is. But why Python doesn't tell which list is it?
It can be: firms[i] or firms[i]['predmet_podnikania'][-1]
It would save a lot of time.
This exception is raised in list class. It is not possible to get variable name (firms) inside list methods so the exception contains a generic message .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With