-1

Hi I have developed my project in a local machine but when I have transferred it for production into a server, I am getting following error:

python manage.py  syncdb

Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/syncdb.py", line 25, in handle
call_command("migrate", **options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 120, in call_command
return command.execute(*args, **defaults)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 93, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 19, in __init__
self.loader = MigrationLoader(self.connection)
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 47, in __init__
self.build_graph()
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 321, in build_graph
_reraise_missing_dependency(migration, parent, e)
File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/loader.py", line 291, in _reraise_missing_dependency
raise exc
django.db.migrations.graph.NodeNotFoundError: Migration MYapp.0010_auto_20160415_1815 dependencies reference nonexistent parent node (u'registration', u'0003_migrate_activatedstatus')

I have just copy my project from one machine to another. My Django version is 1.8.11 Anyone has any idea ? Thanks

Paul85
  • 647
  • 1
  • 11
  • 27
  • By any chance did you create some of these migrations over earlier versions of Django 1.8? I've seen something similar on one of my projects where the migrations would work with 1.8.0 then break oddly with 1.8.2 or later, then suddenly started working again. Might want try getting it working locally, then generating a squash_migration for everything before going to prod. – Paul Apr 21 '16 at 20:26
  • Paul thanks for your reply. I think I have figured out my problem...I have deleted old migration files from production then run it again...So now it is working – Paul85 Apr 21 '16 at 23:02
  • congratulations on resolving the problem, for the future, most probably your error was caused by different version of 'django-registration' on your development (newer) and production (older) version of packages. to avoid such a errors, try to keep `requirements.txt` file with all your dependencies listed with version number - to be able to have same dependencies in the same versions - of course with virtualenv :) – Jerzyk Jun 13 '16 at 16:17

1 Answers1

0

Check Your Django Version and upgrade your dependencies Make sure To Install all dependencies Required For Your Project and then check if your python version is the same

Mark Francis
  • 340
  • 4
  • 10