简体   繁体   English

在命令提示符下运行服务器时出现 django.db.migrations.exceptions.NodeNotFoundError

[英]django.db.migrations.exceptions.NodeNotFoundError when running the server in command prompt

i'm running with this error when running a server.我在运行服务器时遇到此错误。 I changed my code directory name before and so earlier i faced the running problem as well.我之前更改了我的代码目录名称,所以早些时候我也遇到了运行问题。 However, it's fixed after changing the name as well in the settings.py, manage.py, and others that might have the old name.但是,在 settings.py、manage.py 和其他可能具有旧名称的文件中更改名称后,它也得到了修复。 I also install the Django, pillow, and psycopg2 again because it told me when trying to run the server in the command prompt.我还再次安装了 Django、枕头和 psycopg2,因为它在尝试在命令提示符下运行服务器时告诉我。 Now, i faced this problem.现在,我遇到了这个问题。 It says that.它这么说。

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
Exception in thread django-main-thread:
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\karen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\utils\autoreload.py", line 53, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\karen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\core\management\commands\runserver.py", line 121, in inner_run
    self.check_migrations()
  File "C:\Users\karen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\core\management\base.py", line 459, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
  File "C:\Users\karen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\db\migrations\executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "C:\Users\karen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\db\migrations\loader.py", line 53, in __init__
    self.build_graph()
  File "C:\Users\karen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\db\migrations\loader.py", line 255, in build_graph
    self.graph.validate_consistency()
  File "C:\Users\karen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\db\migrations\graph.py", line 195, in validate_consistency
    [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
  File "C:\Users\karen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\db\migrations\graph.py", line 195, in <listcomp>
    [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
  File "C:\Users\karen\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\django\db\migrations\graph.py", line 58, in raise_error
    raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration account.0011_auto_20201117_0027 dependencies reference nonexistent parent node ('auth', '0013_proxyuser')

Can someone help me to find where's the problem?有人可以帮我找出问题所在吗? I am still a beginner and i really hope i can get a solution towards this error.我仍然是一个初学者,我真的希望我能找到解决这个错误的方法。 Thankyou in advance.先感谢您。

This issue arose due to improper migrations.此问题是由于迁移不当引起的。 I would suggest you drop the migration file and try again.我建议您删除迁移文件并重试。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 django.db.migrations.exceptions.NodeNotFoundError - django.db.migrations.exceptions.NodeNotFoundError Django 迁移 - django.db.migrations.exceptions.NodeNotFoundError - Django migrations - django.db.migrations.exceptions.NodeNotFoundError django.db.migrations.exceptions.NodeNotFoundError:运行“python manage.py migrate”时 - django.db.migrations.exceptions.NodeNotFoundError: upon running "python manage.py migrate" 删除迁移文件并获取 django.db.migrations.exceptions.NodeNotFoundError: - Deleting Migration Files and Getting django.db.migrations.exceptions.NodeNotFoundError: 我的项目中没有名为“帐户”的应用程序,但 django 仍然抛出 django.db.migrations.exceptions.NodeNotFoundError - No app named 'account' in my project but django still throws django.db.migrations.exceptions.NodeNotFoundError django.db.migrations.exceptions.NodeNotFoundError:迁移accounts.0001_initial依赖项引用不存在的父节点 - django.db.migrations.exceptions.NodeNotFoundError: Migration accounts.0001_initial dependencies reference nonexistent parent node 删除我的数据库并尝试应用新的迁移后,我收到了这个错误,说 django.db.migrations.exceptions.NodeNotFoundError - After deleting my database and trying to apply a new migrations i get this errors that say django.db.migrations.exceptions.NodeNotFoundError 自定义 django 数据迁移创建记录 allauth.account EmailAddress model 返回错误 - django.db.migrations.exceptions.NodeNotFoundError: - Custom django data migration creating records allauth.account EmailAddress model returns error - django.db.migrations.exceptions.NodeNotFoundError: django.db.migrations.exceptions.NodeNotFoundError:迁移 app.0172_auto_20220603_1746 依赖 _auto_20220601_2313&#39;) - django.db.migrations.exceptions.NodeNotFoundError: Migration app.0172_auto_20220603_1746 dependencie _auto_20220601_2313') Django压缩了迁移:NodeNotFoundError - Django squashed migrations: NodeNotFoundError
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM