i got an error, " 'none type' object is unsubscriptable"... so how to avoid this error.. can u tell me.

Well here is some code that will raise that error

>>> l = None
>>> l[0]

Traceback (most recent call last):
  File "<pyshell#7>", line 1, in <module>
TypeError: 'NoneType' object is unsubscriptable

Now what that error means is that you have something of NoneType, literally it has a value of None, then you try and use the square brackets like you do in a list. But if it is a nonetype it is "unscriptable" so therefore will raise that error.

If you post the code, it would be easier to be more specific.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.