David, Make sure you set the transport class properly when connecting. 8087 is the default port for Protocol Buffers, whereas the default transport in the client is HTTP. Something like this might work:
client = riak.RiakClient(host='127.0.0.1', port=8087, transport_class=riak.transports.pbc.RiakPbcTransport) On Thu, Jul 26, 2012 at 3:24 PM, David Montgomery <davidmontgom...@gmail.com > wrote: > I have riak installed on my local machine. I am not trying to do a > cluster simulation on my local machine, a simple node node locally is > fine. > > when I do a service ping I get a pong. When I run the below python > client it just hangs. > > Below is the code. So...rather confused on where to go at this point. > > So...how to I write to riak? > > import riak > > client = riak.RiakClient(host='127.0.0.1',port=8087) > bucket = client.bucket('test') > # Supply a key to store data under. > # The ``data`` can be any data Python's ``json`` encoder can handle. > person = bucket.new('riak_developer_1', data={ > 'name': 'John Smith', > 'age': 28, > 'company': 'Mr. Startup!', > }) > # Save the object to Riak. > person.store() > > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > -- Sean Cribbs <s...@basho.com> Software Engineer Basho Technologies, Inc. http://basho.com/
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com