Token Type wrote:
In fact, I'm guessing that's your problem. I think you're ending up with a list of lists of strings, when you think you're getting a list of
strings.

Thanks. You guess right. It turns out that lemma_list is a list of list, as I 
tested in the previous post.

I often noticed people around me that are not that familiar with python are dismissing the error stack so quickly ; they probably knows the machine is trying to communicate with them but they don't seem to understand the message. Error stacks may be difficult to read at first glance but you can solve a lot of problems just by reading it.

So next time you see 'X' has no attribute 'Y', you'll know that you've accessed an attribute/method of an object that does not exist, either you made a typo in the attribute name, or you object is not actually what you think it is.

Advice : if you have so time, install ipython and execute your scripts in an ipython shell with the %pdb faeture on. This will automatically call the debugger upon unhandled exceptions and you'll be able to inspect your objects live from the prompt.

JM






--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to