嗨,伙计们为如此愚蠢而感到抱歉,但是即使再次安装django并启动了一个新项目后,我还是遇到了这个问题,但现在在线搜索一周都没有用。
每次运行迁移时,都会出现此错误,这让我头疼,尝试过python manage.py runserver --fake,尝试删除py文件删除数据库等等,但失败了
这是错误
PS C:\Users\Willie\desktop\maoni\maoni> python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\management\__init__.py",
line 364, in execute_from_command_line
utility.execute()
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\management\__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\management\base.py", lin
e 283, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\management\base.py", lin
e 330, in execute
output = self.handle(*args, **options)
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\management\commands\migr
ate.py", line 83, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\executor.py", l
ine 20, in __init__
self.loader = MigrationLoader(self.connection)
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\loader.py", lin
e 52, in __init__
self.build_graph()
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\loader.py", lin
e 274, in build_graph
raise exc
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\loader.py", lin
e 244, in build_graph
self.graph.validate_consistency()
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\graph.py", line
261, in validate_consistency
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\graph.py", line
261, in <listcomp>
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\db\migrations\graph.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', '0001_initial')
PS C:\Users\Willie\desktop\maoni\maoni> python 825 manage.py migrate
C:\Users\Willie\AppData\Local\Programs\Python\Python35-32\python.exe: can't open file '825': [Errno 2] No such file or d
irectory