Ashok Kumarkvm
Ashok Kumarkvm

Reputation: 148

TypeError: 'frozenset' object is not callable; Python2.7

Traceback (most recent call last):
File "sample.py", line 7, in
from ctypes.util import find_library
File "/usr/local/lib/python2.7/dist-packages/ctypes-1.0.2-py2.7-linux-x86_64.egg/ctypes/util.py", line 46, in
import re, tempfile, errno
File "/usr/lib/python2.7/tempfile.py", line 35, in
from random import Random as _Random
File "/usr/lib/python2.7/random.py", line 49, in
import hashlib as _hashlib
File "build/bdist.linux-x86_64/egg/hashlib.py", line 115, in
"""
TypeError: 'frozenset' object is not callable

How to fix this problem?

Upvotes: 1

Views: 6308

Answers (2)

Di Zou
Di Zou

Reputation: 4609

Since you don't have any code, my best guess if you did something like this:

my_frozenset_obj(some_index)

instead of this:

my_frozenset_obj.pop()

If you want to be able to access the items by an index, then you should be using a data structure that is not a set.

Upvotes: 1

GhitaB
GhitaB

Reputation: 3437

I received today the same error. For me the solution was to replace: except ImportError: with except: in line 129 of my_project_path/eggs/hashlib-20081119-py2.7-linux-x86_64.egg/hashlib.py

Seems this was related to value md_meth_names for funcName and this discussion helped me: https://askubuntu.com/questions/575598/python-attributeerror-with-hashlib-no-such-attribute-openssl-md-meth-names

Upvotes: 3

Related Questions