You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Saran <sa...@gmail.com> on 2009/11/21 19:20:54 UTC
Problem with cassdict import
Hi,
Im using latest co of cassdict and cassandra. After doing all the
other procedures for cassandra-thrift, i try to run the test.py from
cassdict, and I get an import error. Please notice that it is able to
import some classes (Column, SuperColumn) from the file
cassandra/interface/gen-py/cassandra/ttypes.py, but not the remaining
( ColumnOrSuperColumn, SlicePredicate, SliceRange, ConsistencyLevel).
Any help will be appreciated.
Thanks,
Saran
In [1]: import cassdict.connection as connection
...:
In [2]: from cassdict.cass import *
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/home/sridhar/Desktop/cassdict/<ipython console> in <module>()
/home/sridhar/Desktop/cassdict/cassdict/cass.py in <module>()
13 import pdb
14
---> 15 from cassandra.ttypes import Column, SuperColumn, ColumnOrSuperColumn, \
16 SlicePredicate, SliceRange, ConsistencyLevel, ColumnPath,
ColumnParent
17
ImportError: cannot import name ColumnOrSuperColumn
Re: Problem with cassdict import
Posted by Saran <sa...@gmail.com>.
Hi Evans,
Thanks for the response. I just got some time to try it out.
The problem was due to lxml module not being installed properly.
Thanks,
Saran
On Mon, Nov 23, 2009 at 9:55 AM, Eric Evans <ee...@rackspace.com> wrote:
> On Sat, 2009-11-21 at 12:20 -0600, Saran wrote:
>> In [2]: from cassdict.cass import *
>> ---------------------------------------------------------------------------
>> ImportError Traceback (most recent call
>> last)
>>
>> /home/sridhar/Desktop/cassdict/<ipython console> in <module>()
>>
>> /home/sridhar/Desktop/cassdict/cassdict/cass.py in <module>()
>> 13 import pdb
>> 14
>> ---> 15 from cassandra.ttypes import Column, SuperColumn,
>> ColumnOrSuperColumn, \
>> 16 SlicePredicate, SliceRange, ConsistencyLevel, ColumnPath,
>> ColumnParent
>> 17
>>
>> ImportError: cannot import name ColumnOrSuperColum
>
> I've never used cassdict, but this looks to me like you either haven't
> generated the thrift code for cassandra, or it is not in your
> PYTHONPATH.
>
> --
> Eric Evans
> eevans@rackspace.com
>
>
Re: Problem with cassdict import
Posted by Eric Evans <ee...@rackspace.com>.
On Sat, 2009-11-21 at 12:20 -0600, Saran wrote:
> In [2]: from cassdict.cass import *
> ---------------------------------------------------------------------------
> ImportError Traceback (most recent call
> last)
>
> /home/sridhar/Desktop/cassdict/<ipython console> in <module>()
>
> /home/sridhar/Desktop/cassdict/cassdict/cass.py in <module>()
> 13 import pdb
> 14
> ---> 15 from cassandra.ttypes import Column, SuperColumn,
> ColumnOrSuperColumn, \
> 16 SlicePredicate, SliceRange, ConsistencyLevel, ColumnPath,
> ColumnParent
> 17
>
> ImportError: cannot import name ColumnOrSuperColum
I've never used cassdict, but this looks to me like you either haven't
generated the thrift code for cassandra, or it is not in your
PYTHONPATH.
--
Eric Evans
eevans@rackspace.com