Question about counters

Alex De la rosa alex.rosa.box at gmail.com
Tue Jul 1 10:35:56 EDT 2014


Is ok, I will manage to fix it, if not I will just remake my VM.

Cheers,
Alex

On Tuesday, July 1, 2014, Sean Cribbs <sean at basho.com> wrote:

> Sorry, I don't know how to fix that then. I don't know whether an updated
> package for any of those is available via Ubuntu or PPA, because I've
> always installed Python dependencies via pip or easy_install. In general, I
> would distrust the distribution version because they tend to be out-of-date.
>
>
> On Tue, Jul 1, 2014 at 9:07 AM, Alex De la rosa <alex.rosa.box at gmail.com
> <javascript:_e(%7B%7D,'cvml','alex.rosa.box at gmail.com');>> wrote:
>
>> Hi Sean,
>>
>> I indeed installed the GIT client with "python setup.py install" and then
>> is when this error happened.
>>
>> Cheers,
>> Alex
>>
>>
>> On Tue, Jul 1, 2014 at 4:03 PM, Sean Cribbs <sean at basho.com
>> <javascript:_e(%7B%7D,'cvml','sean at basho.com');>> wrote:
>>
>>> Alex,
>>>
>>> As I might have mentioned before, the Python client is in a bit of flux
>>> right now as we try to complete support for the Riak 2.0 features. In order
>>> to support Riak 2.0's security capabilities, we have had to pull in
>>> pyOpenSSL as a dependency (which has its own dependencies as well), which
>>> explains the error you got. From within your git checkout, run this:
>>>
>>> ./setup.py install
>>>
>>> That should ensure that all the proper dependencies are installed.
>>>
>>>
>>> On Tue, Jul 1, 2014 at 8:52 AM, Alex De la rosa <alex.rosa.box at gmail.com
>>> <javascript:_e(%7B%7D,'cvml','alex.rosa.box at gmail.com');>> wrote:
>>>
>>>> Uhm... I'm new to Python so that sounds like Chinese to me... I will
>>>> have to look online how to do all that, see if I can fix it.
>>>>
>>>> Cheers,
>>>> Alex
>>>>
>>>>
>>>> On Tue, Jul 1, 2014 at 3:50 PM, Luke Bakken <lbakken at basho.com
>>>> <javascript:_e(%7B%7D,'cvml','lbakken at basho.com');>> wrote:
>>>>
>>>>> Alex,
>>>>>
>>>>> I did a Google search on the following string:
>>>>>
>>>>> "ImportError: No module named
>>>>> cryptography.hazmat.bindings.openssl.binding"
>>>>>
>>>>> Your python2-pyopenssl module may be out of date. I would recommend
>>>>> first uninstalling the Python Riak client from your global Python
>>>>> libraries. Then, use virtualenv to create a testing environment so you
>>>>> can work through these issues. Once you have everything working via
>>>>> your virtualenv-environment, update your global environment.
>>>>>
>>>>> --
>>>>> Luke Bakken
>>>>> CSE
>>>>> lbakken at basho.com <javascript:_e(%7B%7D,'cvml','lbakken at basho.com');>
>>>>>
>>>>>
>>>>> On Tue, Jul 1, 2014 at 6:40 AM, Alex De la rosa <
>>>>> alex.rosa.box at gmail.com
>>>>> <javascript:_e(%7B%7D,'cvml','alex.rosa.box at gmail.com');>> wrote:
>>>>> >
>>>>> > 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.box at gmail.com
>>>>> <javascript:_e(%7B%7D,'cvml','alex.rosa.box at 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 <lbakken at basho.com
>>>>> <javascript:_e(%7B%7D,'cvml','lbakken at 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
>>>>> >>> lbakken at basho.com
>>>>> <javascript:_e(%7B%7D,'cvml','lbakken at basho.com');>
>>>>> >>>
>>>>> >>>
>>>>> >>> On Tue, Jul 1, 2014 at 2:10 AM, Alex De la rosa <
>>>>> alex.rosa.box at gmail.com
>>>>> <javascript:_e(%7B%7D,'cvml','alex.rosa.box at 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 at lists.basho.com
>>>> <javascript:_e(%7B%7D,'cvml','riak-users at lists.basho.com');>
>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>>
>>>>
>>>
>>>
>>> --
>>> Sean Cribbs <sean at basho.com
>>> <javascript:_e(%7B%7D,'cvml','sean at basho.com');>>
>>> Software Engineer
>>> Basho Technologies, Inc.
>>> http://basho.com/
>>>
>>
>>
>
>
> --
> Sean Cribbs <sean at basho.com
> <javascript:_e(%7B%7D,'cvml','sean at basho.com');>>
> Software Engineer
> Basho Technologies, Inc.
> http://basho.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140701/23169bd3/attachment.html>


More information about the riak-users mailing list