AttributeError: 'list' object has no attribute 'lower'
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri Sep 14 11:18:27 EDT 2012
On Fri, 14 Sep 2012 08:01:11 -0700, Token Type wrote:
> Thanks. By the way, do we have a list of explanations of error message?
> If so, whenever we come across error message, we can refer to it and
> solve the problem accordingly.
Forget about a "list of explanations of error message[s]". There is no
such list, and there never will be, because there is no limit to the
number and kind of possible error messages.
Instead, you should actually read the error message you see. Python is
telling you what the problem is. Pay attention to it.
AttributeError: 'list' object has no attribute 'lower'
This tells you that you tried to access something.lower, but "something"
is a list, and lists don't have an attribute or method "lower".
Normally, Python will show you the line of source code with the error, so
you will even see the name of the variable.
--
Steven
More information about the Python-list
mailing list