Python Django:manage.py runserver因watchman异常而失败
当我尝试在一个全新的项目上运行Python Django:manage.py runserver因watchman异常而失败,python,django,watchman,Python,Django,Watchman,当我尝试在一个全新的项目上运行manage.py runserver时,我遇到了一个watchman异常: (towngen) gru-mbp:towngenweb gru$ ./manage.py runserver Watching for file changes with WatchmanReloader Performing system checks... System check identified no issues (0 silenced). You have 18 un
manage.py runserver
时,我遇到了一个watchman异常:
(towngen) gru-mbp:towngenweb gru$ ./manage.py runserver
Watching for file changes with WatchmanReloader
Performing system checks...
System check identified no issues (0 silenced).
You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
September 01, 2020 - 01:07:15
Django version 3.1, using settings 'towngenweb.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Traceback (most recent call last):
File "./manage.py", line 22, in <module>
main()
File "./manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 61, in execute
super().execute(*args, **options)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 96, in handle
self.run(**options)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 103, in run
autoreload.run_with_reloader(self.inner_run, **options)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/utils/autoreload.py", line 613, in run_with_reloader
start_django(reloader, main_func, *args, **kwargs)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/utils/autoreload.py", line 598, in start_django
reloader.run(django_main_thread)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/utils/autoreload.py", line 313, in run
self.run_loop()
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/utils/autoreload.py", line 319, in run_loop
next(ticker)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/utils/autoreload.py", line 532, in tick
self.update_watches()
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/utils/autoreload.py", line 505, in update_watches
self._update_watches()
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/utils/autoreload.py", line 494, in _update_watches
self._watch_root(root)
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/django/utils/autoreload.py", line 421, in _watch_root
result = self.client.query('watch-project', str(root.absolute()))
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/pywatchman/__init__.py", line 1052, in query
res = self.receive()
File "/Users/gru/.venvs/towngen/lib/python3.8/site-packages/pywatchman/__init__.py", line 962, in receive
raise CommandError(result['error'])
pywatchman.CommandError: watchman command error: failed to validate command: resolve_projpath: None of the files listed in global config root_files are present in path `/Users/gru/.venvs/towngen/lib/python3.8` or any of its parent directories. root_files is defined by the `/etc/watchman.json` config file and includes `.watchmanconfig`. One or more of these files must be present in order to allow a watch. Try pulling and checking out a newer version of the project?, while executing ('watch-project', '/Users/gru/.venvs/towngen/lib/python3.8')
我的.watchmanconfig
为空:
(towngen) gru-mbp:towngen gru$ cat .watchmanconfig
{}
我做错了什么或错过了什么
(towngen) gru-mbp:towngen gru$ cat .watchmanconfig
{}