Comments (13)
If someone had used an old version (https://github.com/omab/python-social-auth) and changed it to the new version (https://github.com/python-social-auth/social-app-django), he would encounter the error.
from social-app-django.
Do you know how fix this error? I am migration from social_auth to social_django and can't apply migrations
from social-app-django.
I think this issue needs to be re-opened. I'm trying to do an upgrade and followed the migration guide and am getting the same exception:
# python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 63, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 17, in __init__
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 48, in __init__
self.build_graph()
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/loader.py", line 237, in build_graph
self.graph.add_dependency(migration, key, parent)
File "/usr/local/lib/python2.7/site-packages/django/db/migrations/graph.py", line 46, in add_dependency
"Migration %s dependencies reference nonexistent parent node %r" % (migration, parent)
KeyError: u"Migration social_django.0005_auto_20160727_2333 dependencies reference nonexistent parent node (u'social_django', u'0004_auto_20160423_0400')"
I originally had installed and was using python-social-auth==0.2.21
and Django==1.7.11
and then installed the following:
social-auth-app-django==1.2.0
social-auth-core==1.4.0
My django_migrations looks like this:
app | name | applied |
---|---|---|
default | 0001_initial | 2017-01-19 14:33:43.873019+00 |
default | 0002_add_related_name | 2017-01-19 14:33:43.881544+00 |
default | 0003_alter_email_max_length | 2017-01-19 14:33:43.887557+00 |
default | 0004_auto_20160423_0400 | 2017-01-19 14:33:43.893561+00 |
social_auth | 0005_auto_20160727_2333 | 2017-01-19 14:33:43.899437+00 |
There's possible solutions/hacks at omab/python-social-auth#962 to get around this issue.
It seems like #4 should have fixed this, but for some reason it's not working.
from social-app-django.
After trying different things I finally got it to get past that exception and run the final migration (0006) for me by inserting the following into django_migrations
(on top of what was already in there):
INSERT INTO django_migrations ("app", "name", "applied") VALUES ('social_auth', '0001_initial', NOW());
INSERT INTO django_migrations ("app", "name", "applied") VALUES ('social_auth', '0002_add_related_name', NOW());
INSERT INTO django_migrations ("app", "name", "applied") VALUES ('social_auth', '0003_alter_email_max_length', NOW());
INSERT INTO django_migrations ("app", "name", "applied") VALUES ('social_auth', '0004_auto_20160423_0400', NOW());
I had tried inserting it with the app name social_django
, but it seemed to have no effect.
from social-app-django.
Same thing happened to me on Django==1.9.10
from social-app-django.
@omab I appreciate you might have created a lot of work with the split of PSA, but I'm happy to help out.
Maybe a good place to start would be to setup some automated tests? Do you a preferred service? Travis + Tox? I'm happy to start a PR starting off with the files generated by a fresh cookie cutter project, but ultimately you'll have to activate it in Travis.
from social-app-django.
I don't have tests for the Django app yet, I do have them for the core component (and enabled the Travis.ci integration a couple minutes ago).
from social-app-django.
Next steps helped me:
- Uninstall current version and install 0.2.21 version:
pip uninstall python-social-auth
pip install "python-social-auth==0.2.21"
pip install social-auth-app-django
- Run migrations:
python manage.py migrate
- Make changes according to python-social-auth doc
- Run migrations:
python manage.py migrate
from social-app-django.
I just hit this problem. Migration 004_auto_20160423_0400
contains this:
replaces = [
('default', '0004_auto_20160423_0400'),
('social_auth', '0004_auto_20160423_0400')
]
Tracing the migration dependency graph code, that replaces
is causing this migration to add itself to the dependency graph and then remove itself, since it's replacing itself. That's then preventing migration 0005_auto_20160727_2333
from finding its parent.
Removing the default
entry solves this.
from social-app-django.
Same error here. I was using python social auth, and then now trying to update it to social-auth-app-django
django.db.migrations.graph.NodeNotFoundError: Migration social_django.0004_auto_20160423_0400 dependencies reference nonexistent parent node (u'social_django', u'0003_alter_email_max_length')
from social-app-django.
@chipx86 - the replaces
is basically a list of pseudonyms for that particular migration. It should never cause a migration to not be found but only indicate that a migration has already be run. The 'default' entry is there to indicate that if it sees that entry in django_migrations that it's already be run and doesn't need to be run again. In my situation (outlined above), removing that line would cause that migration to be run again.
That being said, obviously something isn't working right.
There was a refactoring done to the build_graph
and was only backported to Django 1.10. I wonder if that fixed this issue. Is anyone having this issue in Django >= 1.10?
from social-app-django.
I am having the same issue. I am on Django1.10
from social-app-django.
This steps fixed it for me:
omab/python-social-auth#962 (comment)
from social-app-django.
Related Issues (20)
- Missing migrations in v5.1.0 ? HOT 10
- Only perform verification or update existing user
- Missing migrations on 5.2.0? HOT 2
- Django 4.2.2 breaks the way JSONField behaves HOT 1
- Question. Request additional Google Permissions outside of login flow
- SAML redirect loses session data storing "next" url and RelayState cannot be used instead
- Requiring POST method by default HOT 1
- Social Auth with Gmail SSO Causing Error --> 'str' object has no attribute 'get' HOT 2
- 5.2.0 not compatible with Django >= 4.2.2
- How to override a field of `AbstractUserSocialAuth` HOT 1
- IrreversibleError when migrating app zero for a new DB HOT 1
- Subclassing AbstractUserSocialAuth creates migration in social_django app. HOT 1
- 5.3.0 migrations feedback HOT 9
- Deprecated Sign In with LinkedIn HOT 2
- Enhance Django OAuth Library for Clean JSON Responses in API Development
- Linkedin complete login step is stuck
- AWS Cognito - Invalid scope error on authentication request HOT 1
- Update to social-core 4.5.2 HOT 1
- OPEN FOR MAINTAINERS
- Problem with facebook when email is added to scope, redirect url is not correct
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from social-app-django.