Giter Club home page Giter Club logo

django_cassandra_backend's Issues

Running syncdb, produces non-working admin

Site matching query does not exist.
Request Method: GET
Request URL: http://my.dol.la/admin/
Django Version: 1.3
Exception Type: DoesNotExist
Exception Value:
Site matching query does not exist.
Exception Location: /usr/local/lib/python2.7/dist-packages/django/db/models/query.py in get, line 351
Python Executable: /usr/bin/python
Python Version: 2.7.2
Python Path:
['/root/django_projects/myproject',
'/usr/local/lib/python2.7/dist-packages/tornado-2.1.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/stormed_amqp-0.1-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/pika-0.9.6_pre0-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/redis-2.4.10-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/South-0.7.3-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/flup-1.0.2-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/PIL-1.1.7-py2.7-linux-x86_64.egg',
'/usr/local/lib/python2.7/dist-packages/django_redis_sessions-0.2.0-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/djangotoolbox-0.9.2-py2.7.egg',
'/usr/local/lib/python2.7/dist-packages/pycassa-1.3.0-py2.7.egg',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.7',
'/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode']
Server time: Sun, 13 Nov 2011 10:40:10 -0600

running syncb against myproject produces error

[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

Creating a simple models fails...

from django.db import models
from django.contrib.sites.models import Site

class SimpleProfile(models.Model):
name = models.CharField()

[12:43] root@my: (~/django_projects/myproject/django_cassandra_backend/myprofile)$ python manage.py shell
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
Type "copyright", "credits" or "license" for more information.

IPython 0.10.2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.

In [1]: from myprofile.models import SimpleProfile

In [2]: s = SimpleProfile(name='patrick')

In [3]: s.save()

DatabaseError Traceback (most recent call last)

/root/django_projects/myproject/django_cassandra_backend/myprofile/ in ()

/usr/local/lib/python2.7/dist-packages/django/db/models/base.pyc in save(self, force_insert, force_update, using)
460 if force_insert and force_update:
461 raise ValueError("Cannot force both insert and updating in model saving.")
--> 462 self.save_base(using=using, force_insert=force_insert, force_update=force_update)
463
464 save.alters_data = True

/usr/local/lib/python2.7/dist-packages/django/db/models/base.pyc in save_base(self, raw, cls, origin, force_insert, force_update, using)
571 if values:
572 # Create a new record.

--> 573 result = manager._insert(values, return_id=update_pk, using=using)
574 else:
575 # Create a new record with defaults for everything.

/usr/local/lib/python2.7/dist-packages/django/db/models/manager.pyc in _insert(self, values, *_kwargs)
193
194 def _insert(self, values, *_kwargs):
--> 195 return insert_query(self.model, values, *_kwargs)
196
197 def _update(self, values, *_kwargs):

/usr/local/lib/python2.7/dist-packages/django/db/models/query.pyc in insert_query(model, values, return_id, raw_values, using)
1434 part of the public API.
1435 """
1436 query = sql.InsertQuery(model)
1437 query.insert_values(values, raw_values)
-> 1438 return query.get_compiler(using=using).execute_sql(return_id)

/usr/local/lib/python2.7/dist-packages/djangotoolbox-0.9.2-py2.7.egg/djangotoolbox/db/basecompiler.pyc in execute_sql(self, return_id)
369 value = self.convert_value_for_db(db_type, value)
370 data[column] = value
--> 371 return self.insert(data, return_id=return_id)
372
373 def insert(self, values, return_id):

/usr/local/lib/python2.7/dist-packages/django/db/backends/django_cassandra/db/compiler.pyc in _func(_args, *_kwargs)
41 def _func(_args, *_kwargs):
42 try:
---> 43 return func(_args, *_kwargs)
44 except Exception, e:
45 raise DatabaseError, DatabaseError(*tuple(e)), sys.exc_info()[2]

/usr/local/lib/python2.7/dist-packages/django/db/backends/django_cassandra/db/compiler.pyc in insert(self, data, return_id)
482 call_cassandra_with_reconnect(db_connection,
483 db_connection.get_client().batch_mutate, {key: {column_family: mutation_list}},
--> 484 self.connection.write_consistency_level)
485
486 if return_id:

/usr/local/lib/python2.7/dist-packages/django/db/backends/django_cassandra/db/utils.pyc in call_cassandra_with_reconnect(connection, fn, _args, *_kwargs)
192 raise CassandraConnectionError()
193 except Exception, e:
--> 194 raise CassandraAccessError()
195
196 return results

/usr/local/lib/python2.7/dist-packages/django/db/backends/django_cassandra/db/utils.pyc in init(self)
179 class CassandraAccessError(DatabaseError):
180 def init(self):
--> 181 super(CassandraAccessException,self).init('Error accessing Cassandra database')
182
183

DatabaseError: global name 'CassandraAccessException' is not defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.