Не работает Exe, собранный из проекта Djabgo. Как решить OSError: [WinError 123] syntax is incorrect: '<frozen importlib._bootstrap
Я скомпилировал свой проект Django с помощью pyinstaller, выполнив -
pyinstaller manage.py --name=MyApp -w
После запуска MyApp.exe в cmd следующей командой -
start MyApp.exe runserver
Показана следующая трассировка -
Traceback (most recent call last):
File "manage.py", line 22, in <module>
File "manage.py", line 18, in main
File "django\core\management\__init__.py", line 401, in execute_from_command_line
utility.execute()
File "django\core\management\__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "django\core\management\base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "D:\Loku\Python\Django\easy_library\dist\easy_library\django\core\management\commands\runserver.py", line 60, in execute
super().execute(*args, **options)
File "django\core\management\base.py", line 369, in execute
output = self.handle(*args, **options)
File "D:\Loku\Python\Django\easy_library\dist\easy_library\django\core\management\commands\runserver.py", line 95, in handle
self.run(**options)
File "D:\Loku\Python\Django\easy_library\dist\easy_library\django\core\management\commands\runserver.py", line 102, in run
autoreload.run_with_reloader(self.inner_run, **options)
File "django\utils\autoreload.py", line 599, in run_with_reloader
start_django(reloader, main_func, *args, **kwargs)
File "django\utils\autoreload.py", line 584, in start_django
reloader.run(django_main_thread)
File "django\utils\autoreload.py", line 299, in run
self.run_loop()
File "django\utils\autoreload.py", line 305, in run_loop
next(ticker)
File "django\utils\autoreload.py", line 345, in tick
for filepath, mtime in self.snapshot_files():
File "django\utils\autoreload.py", line 361, in snapshot_files
for file in self.watched_files():
File "django\utils\autoreload.py", line 260, in watched_files
yield from iter_all_python_module_files()
File "django\utils\autoreload.py", line 105, in iter_all_python_module_files
return iter_modules_and_files(modules, frozenset(_error_files))
File "django\utils\autoreload.py", line 141, in iter_modules_and_files
resolved_path = path.resolve(strict=True).absolute()
File "pathlib.py", line 1215, in resolve
File "pathlib.py", line 210, in resolve
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '<frozen importlib._bootstrap>'
У меня нет идей, как это решить. Пожалуйста, помогите.