Python Error

Ifthikhan Nazeem iftecan2000 at gmail.com
Sun Jul 29 08:52:40 EDT 2012


Hi,

Have you tried printing the list which is passed onto the set. The items in
the list passed should be hashable and possibly there are objects which are
not hashable.

On Sun, Jul 29, 2012 at 2:30 PM, <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.
> > 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.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120729/83f66b60/attachment.html>


More information about the Python-list mailing list