[英]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.