riakBucket에 PNG 이미지 파일을 저장하려고합니다. 여기서 https://riak-python-client.readthedocs.io/en/1.5-stable/tutorial.html 설명서에 설명 된대로 실제로 riakBucketObject.new_binary()를 사용합니다.'RiakBucket'개체에 'new_binary'속성이 없습니다.
내 파이썬 스크립트는 다음과 같습니다 :
>>> import riak
>>> myClient = riak.RiakClient(pb_port=8087, protocol='pbc')
>>> photo_bucket = myClient.bucket('photo-bucket')
>>> file_data = open('/home/kamli/Pictures/Store3.png','rb').read()
>>> key = photo_bucket.new_binary('myphoto', data=file_data, content_type='image/png')
그러나 오류는 다음과 같습니다
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'RiakBucket' object has no attribute 'new_binary'
내 시스템을 통해이 작업을 수행하기 위해 노력하고있어 때
는하지만,이 오류가 팝업입니다
시스템 구성 :
Python version - 2.7.6
Riak Version - 2.2.0