Django学习中遇到的问题(1)

下面是报错的问题:

ModuleNotFoundError: No module named ‘mylibdjango’

Traceback (most recent call last):
File “manage.py”, line 21, in
main()
File “manage.py”, line 17, in main
execute_from_command_line(sys.argv)
File “D:\Anaconda3\lib\site-packages\django\core\management_init_.py”, line 381, in execute_from_command_line
utility.execute()
File “D:\Anaconda3\lib\site-packages\django\core\management_init_.py”, line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “D:\Anaconda3\lib\site-packages\django\core\management\base.py”, line 323, in run_from_argv
self.execute(*args, **cmd_options)
File “D:\Anaconda3\lib\site-packages\django\core\management\commands\runserver.py”, line 60, in execute
super().execute(*args, **options)
File “D:\Anaconda3\lib\site-packages\django\core\management\base.py”, line 364, in execute
output = self.handle(*args, **options)
File “D:\Anaconda3\lib\site-packages\django\core\management\commands\runserver.py”, line 95, in handle
self.run(**options)
File “D:\Anaconda3\lib\site-packages\django\core\management\commands\runserver.py”, line 102, in run
autoreload.run_with_reloader(self.inner_run, **options)
File “D:\Anaconda3\lib\site-packages\django\utils\autoreload.py”, line 598, in run_with_reloader
start_django(reloader, main_func, *args, **kwargs)
File “D:\Anaconda3\lib\site-packages\django\utils\autoreload.py”, line 583, in start_django
reloader.run(django_main_thread)
File “D:\Anaconda3\lib\site-packages\django\utils\autoreload.py”, line 301, in run
self.run_loop()
File “D:\Anaconda3\lib\site-packages\django\utils\autoreload.py”, line 307, in run_loop
next(ticker)
File “D:\Anaconda3\lib\site-packages\django\utils\autoreload.py”, line 347, in tick
for filepath, mtime in self.snapshot_files():
File “D:\Anaconda3\lib\site-packages\django\utils\autoreload.py”, line 363, in snapshot_files
for file in self.watched_files():
File “D:\Anaconda3\lib\site-packages\django\utils\autoreload.py”, line 262, in watched_files
yield from iter_all_python_module_files()
File “D:\Anaconda3\lib\site-packages\django\utils\autoreload.py”, line 103, in iter_all_python_module_files
return iter_modules_and_files(modules, frozenset(_error_files))
File “D:\Anaconda3\lib\site-packages\django\utils\autoreload.py”, line 139, in iter_modules_and_files
if not path.exists():
File “D:\Anaconda3\lib\pathlib.py”, line 1339, in exists
self.stat()
File “D:\Anaconda3\lib\pathlib.py”, line 1161, in stat
return self._accessor.stat(self)
OSError: [WinError 123] 文件名、目录名或卷标语法不正确。: ‘

两个问题是连在一起出现的,我在网上搜了好久也没找到为什么?
但是后来仔细查看了一下发现问题出在这儿:

INSTALLED_APPS = [
‘mylib’
‘django.contrib.admin’,
‘django.contrib.auth’,
‘django.contrib.contenttypes’,
‘django.contrib.sessions’,
‘django.contrib.messages’,
‘django.contrib.staticfiles’,
]

激活应用mylib的时候我忘记写逗号了。

你可能感兴趣的:(djano学习)