Sundeep,

You'll probably have better chances to get these questions answered on the
Python driver group:
https://groups.google.com/a/lists.datastax.com/forum/#!forum/python-driver-user

1. I'd suggest rewriting a bit the first code snippet just to get it to
work first so we can eliminate other possible issues.
2. It looks like an installation issue of libev.



On Sun, Mar 16, 2014 at 7:01 PM, Sundeep Kambhampati <
satyasunde...@gmail.com> wrote:

>
> Thank you for the reply. I installed libev. However, it throwing a new
> exception. I searched online but couldn't find much help.
>
>   File "Utils/readDataCassandra.py", line 6, in <module>
>     from cassandra.io.libevreactor import LibevConnection
>   File
> "/usr/local/lib/python2.7/site-packages/cassandra/io/libevreactor.py", line
> 17, in <module>
>     import cassandra.io.libevwrapper as libev
> ImportError:
> /usr/local/lib/python2.7/site-packages/cassandra/io/libevwrapper.so:
> undefined symbol: ev_run
>
> Can you please help me with this?
>
> Regards,
> Sundeep
>
>
>
>
> On Sun, Mar 16, 2014 at 8:33 PM, Laing, Michael <michael.la...@nytimes.com
> > wrote:
>
>> A possible workaround - not a fix - might be to install libev so the
>> libev event loop is used.
>>
>>  See http://datastax.github.io/python-driver/installation.html
>>
>> Also be sure you are running the latest version: 1.0.2 I believe.
>>
>> Your ';' is outside of your 'str' - actually shouldn't be a problem tho.
>>
>> Good luck!
>> ml
>>
>>
>> On Sun, Mar 16, 2014 at 8:19 PM, Sundeep Kambhampati <
>> satyasunde...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am using cassandra-2.0.4.
>>>
>>> When I execute following python code, I often get an exception mentioned
>>> below. Sometimes it works fine but most of the times it throws an error.
>>> All the nodes are up and running. Data in second column of table is huge,
>>> few thousand characters long and there around 10K rows.
>>>
>>> Code :
>>>
>>> from cassandra.cluster import Cluster
>>>
>>> cluster = Cluster(['10.2.252.0', '10.2.252.1'])
>>> session = cluster.connect('test')
>>>
>>> str = "SELECT * FROM users ";
>>> rows = session.execute(str)
>>>
>>> for user_row in rows:
>>>     print user_row.f_id, user_row.data
>>>
>>> cluster.shutdown()
>>>
>>> Exception:
>>>
>>> Exception in thread event_loop (most likely raised during interpreter
>>> shutdown):
>>> Traceback (most recent call last):
>>>   File "/usr/local/lib/python2.7/threading.py", line 810, in
>>> __bootstrap_inner
>>>   File "/usr/local/lib/python2.7/threading.py", line 763, in run
>>>   File
>>> "/usr/local/lib/python2.7/site-packages/cassandra/io/asyncorereactor.py",
>>> line 52, in _run_loop
>>> <type 'exceptions.AttributeError'>: __exit__
>>>
>>>
>>> Can someone help me fixing this error?
>>>
>>> Regards,
>>> Sundeep
>>>
>>
>>
>


-- 

:- a)


Alex Popescu
Sen. Product Manager @ DataStax
@al3xandru

Reply via email to