Ok... now is worse... i removed my old Python client EGG and cloned the GIT
repository, and after install it, I get the following error:

Traceback (most recent call last):
  File "test.py", line 13, in <module>
    import riak
  File "build/bdist.linux-x86_64/egg/riak/__init__.py", line 59, in <module>
  File "build/bdist.linux-x86_64/egg/riak/client/__init__.py", line 29, in
<module>
  File "build/bdist.linux-x86_64/egg/riak/client/operations.py", line 19,
in <module>
  File "build/bdist.linux-x86_64/egg/riak/client/transport.py", line 20, in
<module>
  File "build/bdist.linux-x86_64/egg/riak/transports/pbc/__init__.py", line
25, in <module>
  File "build/bdist.linux-x86_64/egg/riak/transports/pbc/transport.py",
line 27, in <module>
  File "build/bdist.linux-x86_64/egg/riak/transports/pbc/connection.py",
line 22, in <module>
  File "build/bdist.linux-x86_64/egg/riak/security.py", line 19, in <module>
  File "build/bdist.linux-x86_64/egg/OpenSSL/__init__.py", line 8, in
<module>
  File "build/bdist.linux-x86_64/egg/OpenSSL/rand.py", line 11, in <module>
  File "build/bdist.linux-x86_64/egg/OpenSSL/_util.py", line 3, in <module>
ImportError: No module named cryptography.hazmat.bindings.openssl.binding

Cheers,
Alex


On Tue, Jul 1, 2014 at 3:32 PM, Alex De la rosa <alex.rosa....@gmail.com>
wrote:

> I actually have the latest version available (2.0.3), I got it like this:
>
> easy_install
> https://pypi.python.org/packages/2.7/r/riak/riak-2.0.3-py2.7.egg
>
> If I clone the GIT repository, may I have problems as I have the
> easy_install package already? would it conflict somehow?
>
> Cheers,
> Alex
>
>
> On Tue, Jul 1, 2014 at 3:23 PM, Luke Bakken <lbak...@basho.com> wrote:
>
>> Hi Alex,
>>
>> Search in Riak 2.0 does require a JVM to be installed as you found.
>>
>> create_search_index is part of the master branch of the Python client:
>>
>> lbakken ~/Projects/basho/riak-python-client (master=)
>> $ git grep create_search_index
>> riak/client/operations.py:461:    def create_search_index(self,
>> transport, index, schema=None, n_val=None):
>>
>> Could you make a clone of the git repository and use the code from there?
>>
>> https://github.com/basho/riak-python-client
>>
>> --
>> Luke Bakken
>> CSE
>> lbak...@basho.com
>>
>>
>> On Tue, Jul 1, 2014 at 2:10 AM, Alex De la rosa <alex.rosa....@gmail.com>
>> wrote:
>>
>>> I found out on http://docs.basho.com/riak/2.0.0beta1/dev/using/search
>>> that in Riak 2.0 additional steps are needed... i fixed my code as follows,
>>> but still crashing:
>>>
>>> -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
>>> -----+-----+-----+-----+-----
>>> import riak
>>> client = riak.RiakClient(protocol='pbc',
>>> nodes=[{'host':'127.0.0.1','http_port':8098,'pb_port':8087}])
>>> client.create_search_index('men') # NEW: Creating a search index
>>> bucket = client.bucket('accounts')
>>> bucket.enable_search()
>>> bucket.set_property('search_index', 'men') # NEW: Setting the search
>>> index to the bucket
>>> key = bucket.new('alex', data={"username":"Alex","age":25,"sex":"male"},
>>> content_type='application/json')
>>> key.store()
>>> print bucket.search('sex=male')
>>>
>>> -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
>>>
>>> this time seems the Python client is not fully updated again and missing
>>> functionality (like "counters"):
>>>
>>>
>>> -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
>>> Traceback (most recent call last):
>>>   File "test.py", line 3, in <module>
>>>     client.create_search_index('men')
>>> AttributeError: 'RiakClient' object has no attribute
>>> 'create_search_index'
>>>
>>> -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
>>>
>>> Is a problem of the Python client? Or there is something wrong on my
>>> code? When will it be a Python client update solving all these issues? is a
>>> bit frustrating wanting to try the features and see you can not do it
>>> because the client is not fully operational.
>>>
>>> Cheers,
>>> Alex
>>>
>>
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to