Closed akoumjian closed 10 years ago
Are you using a custom user model? Btw, given that you are on a fresh db, migrating is not needed anyway, so you could have simply run syncdb --all
OK, so this is the same issue I am experiencing. I don't have a fresh database though, and I get this every time I run manage.py migrate. Also, running only socialaccount migrations does not cause the error:
$ python manage.py migrate allauth.socialaccount
Running migrations for socialaccount:
- Nothing to migrate.
- Loading initial data for socialaccount.
Installed 0 object(s) from 0 fixture(s)
I am not using a custom user model.
Migrating IS needed for my own models. I can of course set South to ignore allauth, but then if I choose to keep allauth up to date, I may be unable to do so.
I am having trouble reproducing this. Could somebody send over a minimal tarball demonstrating the problem?
I am also seeing this. FWIW removing django-extensions app seems to fix it.
@pennersr here is a tarball which reproduces the problem, although i suspect it is an issue with django-extensions. https://dl.dropboxusercontent.com/u/19815354/auth_bug.tar.gz
Thanks @georgewhewell -- now I can reproduce it, though allauth is not the cause:
Related:
As suggested there, downgrading to South 0.8.2 fixes the problem.
@pennersr, south 0.8.4 fixes this issue.
problem still exists here with South 0.8.4 and Django-Allauth 0.16.1 :-(
Here is my Traceback:
Traceback (most recent call last):
File "./manage.py", line 10, in
I had the exact same error in production, any resolution?
problem still exists here with South 0.8.4 ... Any resolution?
Traceback (most recent call last):
File "./manage.py", line 10, in
@dh1tw @phoenixwizard The problem you guys ran into looks the same but I don't think it is the same as what the OP reported. The OP was reporting an issue with the migrate
command whereas you are running into an issue with the convert_to_south
command, which performs some manipulation of the app cache. I ran into the same issue you guys ran into. I'm running Django 1.6.5, South 0.8.4 and django-allauth 0.15.0. After inspecting the convert_to_south.py
file, I figured that the following two commands would essentially do the same thing that ./manage.py convert_to_south [app]
does:
./manage.py schemamigration [app] --initial
./manage.py migrate [app] --fake
When I run these commands, I don't run into any problem so I'm guessing that convert_to_south
is messing up the app cache somehow. The problem probably has to do with these lines in South's code (in convert_to_south.py
) which are executed between the invocations of schemamigration
and migrate
:
# Now, we need to re-clean and sanitise appcache
hacks.clear_app_cache()
hacks.repopulate_app_cache()
# And also clear our cached Migration classes
Migrations._clear_cache()
@lddubeau any solution you can think of?
@phoenixwizard No solution other than the workaround I've mentioned in my previous post (i.e. run schemamigration
and migrate
in two steps manually). It does not fix the problem in South's code but it at least allows someone who runs into the issue to move forward with their work.
I had this problem and found that it was actually related to a missing import. Not sure if this is related, but could be helpful to any person searching for a fix.
Any solution to this issue? Thanks
aaaaaaaaaand it still happens.
till now!
bruh whyyyyyy
any body have solution
I also got this error and solved it by renaming the file name of the model. I don't know why. I test it several times and reverted it to the old name and got that error. then after renaming, it was solved
for more information, my model's file's name was "invite"
On a fresh 1.6 project, I am attempting to initialize my database. For some reason, get_user_model() is failing during one of the twitter migrations.
Here are the installed apps:
This results in the following output and error during
./manage.py migrate --all
: