Can't get rid of “nonexistent parent node” in django 1.11





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















So far I've tried about anything the internet has given me on this problem and I still haven't solved it.



Python 3.6.1 - django 1.11.2 - virtualenv

I had a django project with two apps account and app2. Recently I decided to split them up into more appropriate apps as the project is growing. Now I have a total of 8 apps where account got split up into user_auth and user, then I deleted account. To tidy it up even more I moved all apps from the root folder to /apps/.



So far, only user, user_auth, app2 is in use where app2 has been untouched.

The code in each separate file was split up, moved to the designated app and recoded to get imports from the correct paths.



To get a fresh start I delete the db.sqlite3 file, removed all *.pyc files, deleted all __pycache__ folders and emptied the migrations folders, making sure to keep all __init__.py files.



Running python manage.py migrate through a virtualenv gives me this output:



Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagement__init__.py", line 363, in execute_from_command_line
utility.execute()
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagement__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementbase.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementbase.py", line 330, in execute
output = self.handle(*args, **options)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementcommandsmigrate.py", line 83, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsexecutor.py", line 20, in __init__
self.loader = MigrationLoader(self.connection)
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 52, in __init__
self.build_graph()
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 274, in build_graph
raise exc
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 244, in build_graph
self.graph.validate_consistency()
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 261, in validate_consistency
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 261, in <listcomp>
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 104, in raise_error
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration auth.0009_user_following dependencies reference nonexistent parent node ('account', '0002_contact')


So far, I've had no luck with these commands, making sure to remove all cached and *.pyc files inbetween:



python manage.py migrate
python manage.py makemigrations
python manage.py makemigrations <app_name>
python manage.py flush
python manage.py --fake
python manage.py --fake <app_name> zero
etc..


I don't get why ('account', '0002_contact') keeps showing up even tho I've deleted about anything that's not directly related to my code.

A "containing text"-search reveals no account what so ever.



Any idea where to look next?










share|improve this question























  • I suggest to read these two posts: post1 post2

    – pooya
    Jul 16 '17 at 9:50


















0















So far I've tried about anything the internet has given me on this problem and I still haven't solved it.



Python 3.6.1 - django 1.11.2 - virtualenv

I had a django project with two apps account and app2. Recently I decided to split them up into more appropriate apps as the project is growing. Now I have a total of 8 apps where account got split up into user_auth and user, then I deleted account. To tidy it up even more I moved all apps from the root folder to /apps/.



So far, only user, user_auth, app2 is in use where app2 has been untouched.

The code in each separate file was split up, moved to the designated app and recoded to get imports from the correct paths.



To get a fresh start I delete the db.sqlite3 file, removed all *.pyc files, deleted all __pycache__ folders and emptied the migrations folders, making sure to keep all __init__.py files.



Running python manage.py migrate through a virtualenv gives me this output:



Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagement__init__.py", line 363, in execute_from_command_line
utility.execute()
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagement__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementbase.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementbase.py", line 330, in execute
output = self.handle(*args, **options)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementcommandsmigrate.py", line 83, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsexecutor.py", line 20, in __init__
self.loader = MigrationLoader(self.connection)
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 52, in __init__
self.build_graph()
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 274, in build_graph
raise exc
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 244, in build_graph
self.graph.validate_consistency()
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 261, in validate_consistency
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 261, in <listcomp>
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 104, in raise_error
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration auth.0009_user_following dependencies reference nonexistent parent node ('account', '0002_contact')


So far, I've had no luck with these commands, making sure to remove all cached and *.pyc files inbetween:



python manage.py migrate
python manage.py makemigrations
python manage.py makemigrations <app_name>
python manage.py flush
python manage.py --fake
python manage.py --fake <app_name> zero
etc..


I don't get why ('account', '0002_contact') keeps showing up even tho I've deleted about anything that's not directly related to my code.

A "containing text"-search reveals no account what so ever.



Any idea where to look next?










share|improve this question























  • I suggest to read these two posts: post1 post2

    – pooya
    Jul 16 '17 at 9:50














0












0








0








So far I've tried about anything the internet has given me on this problem and I still haven't solved it.



Python 3.6.1 - django 1.11.2 - virtualenv

I had a django project with two apps account and app2. Recently I decided to split them up into more appropriate apps as the project is growing. Now I have a total of 8 apps where account got split up into user_auth and user, then I deleted account. To tidy it up even more I moved all apps from the root folder to /apps/.



So far, only user, user_auth, app2 is in use where app2 has been untouched.

The code in each separate file was split up, moved to the designated app and recoded to get imports from the correct paths.



To get a fresh start I delete the db.sqlite3 file, removed all *.pyc files, deleted all __pycache__ folders and emptied the migrations folders, making sure to keep all __init__.py files.



Running python manage.py migrate through a virtualenv gives me this output:



Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagement__init__.py", line 363, in execute_from_command_line
utility.execute()
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagement__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementbase.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementbase.py", line 330, in execute
output = self.handle(*args, **options)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementcommandsmigrate.py", line 83, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsexecutor.py", line 20, in __init__
self.loader = MigrationLoader(self.connection)
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 52, in __init__
self.build_graph()
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 274, in build_graph
raise exc
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 244, in build_graph
self.graph.validate_consistency()
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 261, in validate_consistency
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 261, in <listcomp>
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 104, in raise_error
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration auth.0009_user_following dependencies reference nonexistent parent node ('account', '0002_contact')


So far, I've had no luck with these commands, making sure to remove all cached and *.pyc files inbetween:



python manage.py migrate
python manage.py makemigrations
python manage.py makemigrations <app_name>
python manage.py flush
python manage.py --fake
python manage.py --fake <app_name> zero
etc..


I don't get why ('account', '0002_contact') keeps showing up even tho I've deleted about anything that's not directly related to my code.

A "containing text"-search reveals no account what so ever.



Any idea where to look next?










share|improve this question














So far I've tried about anything the internet has given me on this problem and I still haven't solved it.



Python 3.6.1 - django 1.11.2 - virtualenv

I had a django project with two apps account and app2. Recently I decided to split them up into more appropriate apps as the project is growing. Now I have a total of 8 apps where account got split up into user_auth and user, then I deleted account. To tidy it up even more I moved all apps from the root folder to /apps/.



So far, only user, user_auth, app2 is in use where app2 has been untouched.

The code in each separate file was split up, moved to the designated app and recoded to get imports from the correct paths.



To get a fresh start I delete the db.sqlite3 file, removed all *.pyc files, deleted all __pycache__ folders and emptied the migrations folders, making sure to keep all __init__.py files.



Running python manage.py migrate through a virtualenv gives me this output:



Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagement__init__.py", line 363, in execute_from_command_line
utility.execute()
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagement__init__.py", line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementbase.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementbase.py", line 330, in execute
output = self.handle(*args, **options)
File "H:ProgrammingVirProjDirlibsite-packagesdjangocoremanagementcommandsmigrate.py", line 83, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsexecutor.py", line 20, in __init__
self.loader = MigrationLoader(self.connection)
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 52, in __init__
self.build_graph()
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 274, in build_graph
raise exc
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsloader.py", line 244, in build_graph
self.graph.validate_consistency()
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 261, in validate_consistency
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 261, in <listcomp>
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "H:ProgrammingVirProjDirlibsite-packagesdjangodbmigrationsgraph.py", line 104, in raise_error
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration auth.0009_user_following dependencies reference nonexistent parent node ('account', '0002_contact')


So far, I've had no luck with these commands, making sure to remove all cached and *.pyc files inbetween:



python manage.py migrate
python manage.py makemigrations
python manage.py makemigrations <app_name>
python manage.py flush
python manage.py --fake
python manage.py --fake <app_name> zero
etc..


I don't get why ('account', '0002_contact') keeps showing up even tho I've deleted about anything that's not directly related to my code.

A "containing text"-search reveals no account what so ever.



Any idea where to look next?







django python-3.x django-models virtualenv django-migrations






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 16 '17 at 1:46









coco4lcoco4l

453




453













  • I suggest to read these two posts: post1 post2

    – pooya
    Jul 16 '17 at 9:50



















  • I suggest to read these two posts: post1 post2

    – pooya
    Jul 16 '17 at 9:50

















I suggest to read these two posts: post1 post2

– pooya
Jul 16 '17 at 9:50





I suggest to read these two posts: post1 post2

– pooya
Jul 16 '17 at 9:50












3 Answers
3






active

oldest

votes


















0














Apparently django kept migration files within it's own module folder. This is what I did:





  1. pip uninstall django.


  2. /Lib/site-packages, deleted django folder.

  3. Deleted all *.pyc files in my project.

  4. Deleted all __pycache__ folders in my project.

  5. Cleared all migrations folders in my project (keep __init__.py).


  6. pip install django==x.x.x.


  7. python manage.py migrate.


  8. python manage.py makemigrations <app_name>.


  9. python manage.py migrate.


  10. python manage.py runserver.

  11. Celebrate.






share|improve this answer































    0














    This is not the problem that the original poster had. However, when I had a similar error, this is how I fixed it.



    In my case, I had the .py extension in the dependency module name, like this:



    dependencies = [
    ('dashboard', '0003_auto_20181024_0603.py'),
    ('auth', '__latest__'),
    ('contenttypes', '__latest__'),
    ]


    I removed the .py, changing it to this



        ('dashboard', '0003_auto_20181024_0603')





    share|improve this answer































      0














      I recently had a problem similar to yours and I hope this can provide you with some direction to finding your solution.



      My problem was only happening in my production environment.



      Why? I will explain.



      We use git for version control and whilst I was doing dev work on my local, I somehow included the app/migrations/0009.py file to the .gitignore file.



      Long story short, I pushed the changes to the remote server and proceded on apply migrations but would constantly run into the issue you described.



      After fiddling with manage.py and all migrations commands which inadvertently didn't yield any solution, I remembered that I hadn't looked to see if the missing dependency file was present.



      The Solution:

      I checked to see if the dependency file existed on the prod environment by running this command in the shell from my Django project folder.



      $ ls app/migration


      This revealed the non-existence of the dependency file required.



      That's when I decided to inspect my local .gitignore file and removed the line app/migrations/0009.py



      I committed my local changes and pushed to the prod server. I then confirmed that the required file was present on the prod server by running this command.



      $ ls app/migration


      I ran



      $ ./manage.py check


      - and this time around the issue was gone.



      All in all, check to make sure that the required dependency file does exist.






      share|improve this answer


























        Your Answer






        StackExchange.ifUsing("editor", function () {
        StackExchange.using("externalEditor", function () {
        StackExchange.using("snippets", function () {
        StackExchange.snippets.init();
        });
        });
        }, "code-snippets");

        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "1"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45124207%2fcant-get-rid-of-nonexistent-parent-node-in-django-1-11%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0














        Apparently django kept migration files within it's own module folder. This is what I did:





        1. pip uninstall django.


        2. /Lib/site-packages, deleted django folder.

        3. Deleted all *.pyc files in my project.

        4. Deleted all __pycache__ folders in my project.

        5. Cleared all migrations folders in my project (keep __init__.py).


        6. pip install django==x.x.x.


        7. python manage.py migrate.


        8. python manage.py makemigrations <app_name>.


        9. python manage.py migrate.


        10. python manage.py runserver.

        11. Celebrate.






        share|improve this answer




























          0














          Apparently django kept migration files within it's own module folder. This is what I did:





          1. pip uninstall django.


          2. /Lib/site-packages, deleted django folder.

          3. Deleted all *.pyc files in my project.

          4. Deleted all __pycache__ folders in my project.

          5. Cleared all migrations folders in my project (keep __init__.py).


          6. pip install django==x.x.x.


          7. python manage.py migrate.


          8. python manage.py makemigrations <app_name>.


          9. python manage.py migrate.


          10. python manage.py runserver.

          11. Celebrate.






          share|improve this answer


























            0












            0








            0







            Apparently django kept migration files within it's own module folder. This is what I did:





            1. pip uninstall django.


            2. /Lib/site-packages, deleted django folder.

            3. Deleted all *.pyc files in my project.

            4. Deleted all __pycache__ folders in my project.

            5. Cleared all migrations folders in my project (keep __init__.py).


            6. pip install django==x.x.x.


            7. python manage.py migrate.


            8. python manage.py makemigrations <app_name>.


            9. python manage.py migrate.


            10. python manage.py runserver.

            11. Celebrate.






            share|improve this answer













            Apparently django kept migration files within it's own module folder. This is what I did:





            1. pip uninstall django.


            2. /Lib/site-packages, deleted django folder.

            3. Deleted all *.pyc files in my project.

            4. Deleted all __pycache__ folders in my project.

            5. Cleared all migrations folders in my project (keep __init__.py).


            6. pip install django==x.x.x.


            7. python manage.py migrate.


            8. python manage.py makemigrations <app_name>.


            9. python manage.py migrate.


            10. python manage.py runserver.

            11. Celebrate.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 16 '17 at 12:09









            coco4lcoco4l

            453




            453

























                0














                This is not the problem that the original poster had. However, when I had a similar error, this is how I fixed it.



                In my case, I had the .py extension in the dependency module name, like this:



                dependencies = [
                ('dashboard', '0003_auto_20181024_0603.py'),
                ('auth', '__latest__'),
                ('contenttypes', '__latest__'),
                ]


                I removed the .py, changing it to this



                    ('dashboard', '0003_auto_20181024_0603')





                share|improve this answer




























                  0














                  This is not the problem that the original poster had. However, when I had a similar error, this is how I fixed it.



                  In my case, I had the .py extension in the dependency module name, like this:



                  dependencies = [
                  ('dashboard', '0003_auto_20181024_0603.py'),
                  ('auth', '__latest__'),
                  ('contenttypes', '__latest__'),
                  ]


                  I removed the .py, changing it to this



                      ('dashboard', '0003_auto_20181024_0603')





                  share|improve this answer


























                    0












                    0








                    0







                    This is not the problem that the original poster had. However, when I had a similar error, this is how I fixed it.



                    In my case, I had the .py extension in the dependency module name, like this:



                    dependencies = [
                    ('dashboard', '0003_auto_20181024_0603.py'),
                    ('auth', '__latest__'),
                    ('contenttypes', '__latest__'),
                    ]


                    I removed the .py, changing it to this



                        ('dashboard', '0003_auto_20181024_0603')





                    share|improve this answer













                    This is not the problem that the original poster had. However, when I had a similar error, this is how I fixed it.



                    In my case, I had the .py extension in the dependency module name, like this:



                    dependencies = [
                    ('dashboard', '0003_auto_20181024_0603.py'),
                    ('auth', '__latest__'),
                    ('contenttypes', '__latest__'),
                    ]


                    I removed the .py, changing it to this



                        ('dashboard', '0003_auto_20181024_0603')






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Oct 29 '18 at 16:18









                    Christian LongChristian Long

                    4,07413739




                    4,07413739























                        0














                        I recently had a problem similar to yours and I hope this can provide you with some direction to finding your solution.



                        My problem was only happening in my production environment.



                        Why? I will explain.



                        We use git for version control and whilst I was doing dev work on my local, I somehow included the app/migrations/0009.py file to the .gitignore file.



                        Long story short, I pushed the changes to the remote server and proceded on apply migrations but would constantly run into the issue you described.



                        After fiddling with manage.py and all migrations commands which inadvertently didn't yield any solution, I remembered that I hadn't looked to see if the missing dependency file was present.



                        The Solution:

                        I checked to see if the dependency file existed on the prod environment by running this command in the shell from my Django project folder.



                        $ ls app/migration


                        This revealed the non-existence of the dependency file required.



                        That's when I decided to inspect my local .gitignore file and removed the line app/migrations/0009.py



                        I committed my local changes and pushed to the prod server. I then confirmed that the required file was present on the prod server by running this command.



                        $ ls app/migration


                        I ran



                        $ ./manage.py check


                        - and this time around the issue was gone.



                        All in all, check to make sure that the required dependency file does exist.






                        share|improve this answer






























                          0














                          I recently had a problem similar to yours and I hope this can provide you with some direction to finding your solution.



                          My problem was only happening in my production environment.



                          Why? I will explain.



                          We use git for version control and whilst I was doing dev work on my local, I somehow included the app/migrations/0009.py file to the .gitignore file.



                          Long story short, I pushed the changes to the remote server and proceded on apply migrations but would constantly run into the issue you described.



                          After fiddling with manage.py and all migrations commands which inadvertently didn't yield any solution, I remembered that I hadn't looked to see if the missing dependency file was present.



                          The Solution:

                          I checked to see if the dependency file existed on the prod environment by running this command in the shell from my Django project folder.



                          $ ls app/migration


                          This revealed the non-existence of the dependency file required.



                          That's when I decided to inspect my local .gitignore file and removed the line app/migrations/0009.py



                          I committed my local changes and pushed to the prod server. I then confirmed that the required file was present on the prod server by running this command.



                          $ ls app/migration


                          I ran



                          $ ./manage.py check


                          - and this time around the issue was gone.



                          All in all, check to make sure that the required dependency file does exist.






                          share|improve this answer




























                            0












                            0








                            0







                            I recently had a problem similar to yours and I hope this can provide you with some direction to finding your solution.



                            My problem was only happening in my production environment.



                            Why? I will explain.



                            We use git for version control and whilst I was doing dev work on my local, I somehow included the app/migrations/0009.py file to the .gitignore file.



                            Long story short, I pushed the changes to the remote server and proceded on apply migrations but would constantly run into the issue you described.



                            After fiddling with manage.py and all migrations commands which inadvertently didn't yield any solution, I remembered that I hadn't looked to see if the missing dependency file was present.



                            The Solution:

                            I checked to see if the dependency file existed on the prod environment by running this command in the shell from my Django project folder.



                            $ ls app/migration


                            This revealed the non-existence of the dependency file required.



                            That's when I decided to inspect my local .gitignore file and removed the line app/migrations/0009.py



                            I committed my local changes and pushed to the prod server. I then confirmed that the required file was present on the prod server by running this command.



                            $ ls app/migration


                            I ran



                            $ ./manage.py check


                            - and this time around the issue was gone.



                            All in all, check to make sure that the required dependency file does exist.






                            share|improve this answer















                            I recently had a problem similar to yours and I hope this can provide you with some direction to finding your solution.



                            My problem was only happening in my production environment.



                            Why? I will explain.



                            We use git for version control and whilst I was doing dev work on my local, I somehow included the app/migrations/0009.py file to the .gitignore file.



                            Long story short, I pushed the changes to the remote server and proceded on apply migrations but would constantly run into the issue you described.



                            After fiddling with manage.py and all migrations commands which inadvertently didn't yield any solution, I remembered that I hadn't looked to see if the missing dependency file was present.



                            The Solution:

                            I checked to see if the dependency file existed on the prod environment by running this command in the shell from my Django project folder.



                            $ ls app/migration


                            This revealed the non-existence of the dependency file required.



                            That's when I decided to inspect my local .gitignore file and removed the line app/migrations/0009.py



                            I committed my local changes and pushed to the prod server. I then confirmed that the required file was present on the prod server by running this command.



                            $ ls app/migration


                            I ran



                            $ ./manage.py check


                            - and this time around the issue was gone.



                            All in all, check to make sure that the required dependency file does exist.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Jan 3 at 22:13









                            Adrian W

                            1,97851522




                            1,97851522










                            answered Jan 3 at 18:05









                            iMeyerKimeraiMeyerKimera

                            13




                            13






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45124207%2fcant-get-rid-of-nonexistent-parent-node-in-django-1-11%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Mossoró

                                Error while reading .h5 file using the rhdf5 package in R

                                Pushsharp Apns notification error: 'InvalidToken'