You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.
I have just started with cassandra, so don't know if this should be realy reported as a bug,
If one try to get column family but haven't created that column family/keyspace
using pycassaShell will get error,
>>> keyspace = "test_ks"
>>> column_family = "test_cf"
>>> pool = pycassa.connect(keyspace)
>>> col_fam = pycassa.ColumnFamily(pool, column_family)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pycassa/columnfamily.py", line 252, in __init__
self.load_schema()
File "pycassa/columnfamily.py", line 269, in load_schema
use_dict_for_col_metadata=True)
File "pycassa/pool.py", line 573, in execute
self.put(conn)
UnboundLocalError: local variable 'conn' referenced before assignment
I got this error, checked what happen and I created keyspace and column family,
and haven't got that error again,
pycassaShell
[I]: IPython not found, falling back to default interpreter.
----------------------------------
Cassandra Interactive Python Shell
----------------------------------
Keyspace: None
Host: localhost:9160
ColumnFamily instances are only available if a keyspace is specified with -k/--keyspace
Schema definition tools and cluster information are available through SYSTEM_MANAGER.
>>> SYSTEM_MANAGER.create_keyspace('test_ks', replication_factor=1)
>>> SYSTEM_MANAGER.create_column_family('test_ks','test_cf')
>>>
>>> pool = pycassa.connect(keyspace)
>>> col_fam = pycassa.ColumnFamily(pool, column_family)
>>> row_id_1 = "1"
>>> col_fam.insert(row_id_1, {'name':'Some name'})
My env:
python: 2.6.5
cassandra: 0.8.6
pycassa: 1.2.0
The text was updated successfully, but these errors were encountered:
Hi,
I have just started with cassandra, so don't know if this should be realy reported as a bug,
If one try to get column family but haven't created that column family/keyspace
using pycassaShell will get error,
I got this error, checked what happen and I created keyspace and column family,
and haven't got that error again,
My env:
python: 2.6.5
cassandra: 0.8.6
pycassa: 1.2.0
The text was updated successfully, but these errors were encountered: