basho / riak-python-client

The Riak client for Python.
Apache License 2.0
320 stars 182 forks source link

TypeError: 'dict' object is not callable #528

Open shazianusrat opened 7 years ago

shazianusrat commented 7 years ago

Following is my function in my code:

         def getData(self, bucket, key, nestedKey = None):
        expiry = None
        bucket_store = self.mClient.bucket(bucket)
        print self.mClient.get_buckets()
        returnKey = bucket_store.get(key)
        currenttime = datetime.datetime.now()
        returnData = returnKey.data
        if returnData != None:
            print "Empty return Data"
            if nestedKey != None and nestedKey in returnData:
                returnData = returnData[nestedKey]
        print "Getting Data for key : ",key," from bucket : ",bucket," wtih nested key : ",nestedKey
        print "Result : ",returnData," \n"
        return returnData

I get an error at "returnData = returnKey.data"

Any word for it? I am using version 2.7.5 for riak python client.