Python Error

Mark Lawrence breamoreboy at yahoo.co.uk
Sun Jul 29 15:53:44 CEST 2012


On 29/07/2012 13:30, subhabangalore at gmail.com wrote:
> On Sunday, July 29, 2012 2:57:18 PM UTC+5:30, (unknown) wrote:
>> Dear Group,
>>
>> I was trying to convert the list to a set, with the following code:
>>
>> set1=set(list1)
>>
> Dear Peter,
> Thanks for the answer. But my list does not contain another list that is the issue. Intriguing. Thinking what to do.
> Regards,
> Subhabrata.

Can you loop round the list and print each entry and its type, that 
should give you some clues?

>> the code was running fine, but all on a sudden started to give the following error,
>>
>> set1=set(list1)
>>
>> TypeError: unhashable type: 'list'
>>
>> please let me know how may I resolve.
>>
>> And sometimes some good running program gives error all on a sudden with no parameter changed, how may I debug it?
>>
>> Thanking You in Advance,
>>
>> Regards,
>>
>> Subhabrata Banerjee.
>


-- 
Cheers.

Mark Lawrence.




More information about the Python-list mailing list