Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

running syncb against myproject produces error #1

Open
reduxdj opened this Issue Nov 12, 2011 · 1 comment

Comments

Projects
None yet
1 participant

reduxdj commented Nov 12, 2011

[18:06] root@my: (~/django_projects/myproject)$ python manage.py syncdb
Traceback (most recent call last):
File "manage.py", line 11, in
execute_manager(settings)
File "/usr/local/lib/python2.7/dist-packages/Django-1.3.1-py2.7.egg/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.3.1-py2.7.egg/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.3.1-py2.7.egg/django/core/management/base.py", line 191, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/local/lib/python2.7/dist-packages/Django-1.3.1-py2.7.egg/django/core/management/base.py", line 220, in execute
output = self.handle(_args, *_options)
File "/usr/local/lib/python2.7/dist-packages/Django-1.3.1-py2.7.egg/django/core/management/base.py", line 351, in handle
return self.handle_noargs(**options)
File "/usr/local/lib/python2.7/dist-packages/Django-1.3.1-py2.7.egg/django/core/management/commands/syncdb.py", line 59, in handle_noargs
tables = connection.introspection.table_names()
File "/root/django_projects/myproject/django_cassandra/db/introspection.py", line 32, in table_names
return BaseDatabaseIntrospection.table_names(self)
File "/usr/local/lib/python2.7/dist-packages/Django-1.3.1-py2.7.egg/django/db/backends/init.py", line 792, in table_names
return self.get_table_list(cursor)
File "/root/django_projects/myproject/django_cassandra/db/introspection.py", line 21, in get_table_list
db_connection = self.connection.db_connection
File "/root/django_projects/myproject/django_cassandra/db/base.py", line 241, in db_connection
return self.get_db_connection(True, True)
File "/root/django_projects/myproject/django_cassandra/db/base.py", line 233, in get_db_connection
keyspace_def = KsDef(**keyspace_def_args)
NameError: global name 'KsDef' is not defined

running latest cassandra and thrift .074

reduxdj commented Nov 13, 2011

The problem was the version of thrift that I was importing, in my dist-packages Cassandra. I had already knew that I was using the latest Thrift and Pycassa. So, I had to actually copy the contents out of pycassa.cassandra to dist-packages.cassadra. I don't know how this got confused, but I might suggest looking for it there. As, pycassa is the general intro to Cassandra in python, because of it's easy API. Also, I wasn't even running nonrel django - i had to completely remove my django and then re-install django-nonrel. Great work, I plan to follow your project. I actually use cassandra at work so For me cassandra working in django is nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment