MultilingualQuery has no attribute 'extra_where' exception when trying syncdb.
kmetaxas opened this issue · comments
When i'm trying syncdb, after table creation and user creation, syncdb breaks with the following exception:
File "/usr/lib64/python2.6/site-packages/django_multilingual_ng-0.1.19-py2.6.egg/multilingual/query.py", line 473, in get_count
if ((not (self.select or self.where or self.extra_where))
AttributeError: 'MultilingualQuery' object has no attribute 'extra_where'
A fast grep on django-multilingual-ng and django source code does not give any indication of 'extra_where' ever being assigned somewhere, and yet it is being tested in get_count() (query.py line 473)
Looking at the traceback I assume you use an old version of django-multilingual-ng, please switch to the current master
I'm not familiar with git so, to make sure, i removed my clone and re-cloned. I also removed django-multilingual-ng from site-packages before installing.
Command i used: hg clone git://github.com/ojii/django-multilingual-ng.git
The problem persists.
this is git, not mercurial, so you should do git clone git://github.com/ojii/django-multilingual-ng.git
, however since you're not familiar with git I recommend downloading the tarball: http://github.com/ojii/django-multilingual-ng/tarball/master
I looked through the code again and the problem seems to be your Django, what version of Django do you use? (django-multilingual-ng only supports Django 1.2!)
oops. sorry. i'm using mercurial for my work and i typed it here by accident. Obviously i used git clone or i wouldn't have cloned anything :p
I'm using Django trunk currently revision: 12819
that is weird, could you provide me with the code you use that generates that error? The extra_where
is assigned on line 131 of django/db/models/sql/query.py (django 1.2-beta-1), so that should work.
found out http://code.djangoproject.com/changeset/12502 breaks this. thanks for reporting.
if you want to use django-multilingual-ng with Django revisions >= 12502, please patch multilingual/query.py
with following diff:
473c473 < if ((not (self.select or self.where or self.extra_where)) --- > if ((not (self.select or self.where))