1 **. Я следую учебному пособию по Mo sh (youtube https://www.youtube.com/watch?v=_uQrJ0TkZlc) - в той части, где мы попадаем в часть SQLite для БД, он сказал это длинное сообщение при написании "Python manage.py makemigrations ":
(venv) C:\Users\user\PycharmProjects\PyShop>python manage.py makemigrations
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\core\management\__init__.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\core\management\__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\core\management\base.py", line 316, in run_from_argv
self.execute(*args, **cmd_options)
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\core\management\base.py", line 350, in execute
self.check()
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\core\management\base.py", line 376, in check
all_issues = self._run_checks(
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\core\management\base.py", line 366, in _run_checks
return checks.run_checks(**kwargs)
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\core\checks\registry.py", line 71, in run_checks
new_errors = check(app_configs=app_configs)
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\core\checks\urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\core\checks\urls.py", line 23, in check_resolver
return check_method()
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\urls\resolvers.py", line 396, in check
for pattern in self.url_patterns:
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\utils\functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\urls\resolvers.py", line 533, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\utils\functional.py", line 37, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-
packages\django\urls\resolvers.py", line 526, in urlconf_module
return import_module(self.urlconf_name)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py",
line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\user\PycharmProjects\PyShop\pyshop\urls.py", line 21, in <module>
path('products/', include('products.urls'))
File "C:\Users\user\PycharmProjects\PyShop\venv\lib\site-packages\django\urls\conf.py",
line 34, in include
urlconf_module = import_module(urlconf_module)
File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py",
line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 779, in exec_module
File "<frozen importlib._bootstrap_external>", line 916, in get_code
File "<frozen importlib._bootstrap_external>", line 846, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\user\PycharmProjects\PyShop\products\urls.py", line 7
path('new', views.new)
^
SyntaxError: invalid syntax****
В своем уроке он также перетянул документ db.sqlite3 из Pycharm в браузер БД, и когда я пытаюсь это сделать, он говорит: «Файл базы данных не открыт». ?
Спасибо!