English 中文(简体)
Setup Cassandra for Django - "AttributeError: SystemManager object has no attribute describe_keyspace "
原标题:

I ve followed step-by-step guide in https://github.com/thobbs/twissandra

I m stuck at python manage.py sync_cassandra where I got message:

[ /home/z/twissandra ,  /home/z/twiss/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg ,  /home/z/twiss/lib/python2.6/site-packages/pip-0.8.2-py2.6.egg ,  /home/z/twiss/lib/python2.6 ,  /home/z/twiss/lib/python2.6/plat-linux2 ,  /home/z/twiss/lib/python2.6/lib-tk ,  /home/z/twiss/lib/python2.6/lib-old ,  /home/z/twiss/lib/python2.6/lib-dynload ,  /usr/lib/python2.6 ,  /usr/lib/python2.6/plat-linux2 ,  /usr/lib/python2.6/lib-tk ,  /home/z/twiss/lib/python2.6/site-packages ,  /usr/local/lib/python2.6/dist-packages/pycassa-1.0.5-py2.6.egg ,  /usr/local/lib/python2.6/dist-packages/virtualenv-1.5.1-py2.6.egg ,  /usr/local/lib/python2.6/site-packages ,  /usr/local/lib/python2.6/dist-packages ,  /usr/lib/python2.6/dist-packages ,  /usr/lib/python2.6/dist-packages/PIL ,  /usr/lib/python2.6/dist-packages/gst-0.10 ,  /usr/lib/pymodules/python2.6 ,  /usr/lib/python2.6/dist-packages/gtk-2.0 ,  /usr/lib/pymodules/python2.6/gtk-2.0 ]
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/z/twiss/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/z/twiss/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/z/twiss/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/z/twiss/lib/python2.6/site-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/home/z/twiss/lib/python2.6/site-packages/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/home/z/twissandra/tweets/management/commands/sync_cassandra.py", line 17, in handle_noargs
    sys.describe_keyspace( Twissandra )
AttributeError:  SystemManager  object has no attribute  describe_keyspace 

I have no idea about this. What to do?

最佳回答

I just noticed that I never merged the sync_cassandra branch (which fixes this issue) into my master branch, because I was expecting ericflo to accept the pull request a little more quickly.

I just merged a moment ago, so pull the master branch and try again. By the way, github is probably a more appropriate place for this question than SO.

问题回答

Little tip, If you’re getting this error in Python and you have no idea why, check for circular imports. That’s what the problem was for me.

A circular import is for example module A imports module B and module B imports module A. There are certain scenarios where this doesn’t work.





相关问题
How to get two random records with Django

How do I get two distinct random records using Django? I ve seen questions about how to get one but I need to get two random records and they must differ.

Moving (very old) Zope/Plone Site to Django

I am ask to move data from a (now offline) site driven by Plone to a new Django site. These are the version informations I have: Zope Version (unreleased version, python 2.1.3 ) Python Version 2.1....

Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

Flexible pagination in Django

I d like to implement pagination such that I can allow the user to choose the number of records per page such as 10, 25, 50 etc. How should I go about this? Is there an app I can add onto my project ...

is it convenient to urlencode all next parameters? - django

While writing code, it is pretty common to request a page with an appended "next" query string argument. For instance, in the following template code next points back to the page the user is on: &...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

热门标签