Please could you tell me what am I doing wrong? 

Trying to freeze a web server for one. 🙃

You’re chasing the wrong issue here. Django contains many submodules which 
can’t be loaded unless you have some strange stuff installed on your 
machine. PyInstaller collects each submodule only if its loadable which 
leads to a 18596 WARNING: Hidden import 
"django.contrib.sessions.templatetags" not found! message for each 
submodule that isn’t. You appear to has been misled into trying to force 
PyInstaller to collect those unusable (and unneeded) submodules which has 
led to the warnings being promoted to errors and has done nothing to fix 
the real runtime issue which I’m guessing is this one?
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 
"django/core/management/__init__.py", line 442, in 
execute_from_command_line File "django/core/management/__init__.py", line 
436, in execute File "django/core/management/base.py", line 413, in 
run_from_argv File "django/core/management/commands/runserver.py", line 74, 
in execute File "django/core/management/base.py", line 459, in execute File 
"django/core/management/commands/runserver.py", line 111, in handle File 
"django/core/management/commands/runserver.py", line 118, in run File 
"django/utils/autoreload.py", line 673, in run_with_reloader File 
"PyInstaller/hooks/rthooks/pyi_rth_django.py", line 24, in 
_restart_with_reloader File "django/utils/autoreload.py", line 272, in 
restart_with_reloader File "django/utils/autoreload.py", line 259, in 
get_child_arguments RuntimeError: Script runserver does not exist. [1326876] 
Failed to execute script 'manage' due to unhandled exception! 

That is caused by django trying to auto reload your code whenever it 
changes which makes no sense under PyInstaller since the code is frozen and 
not even visible on the file system. The fix is to pass --noreload.
python -m django startproject hellodjango cd hellodjango/ pyinstaller 
manage.py ./dist/manage/manage runserver --noreload 
​

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/3e5bf22c-d3ce-49e2-9374-a18ac117a876n%40googlegroups.com.

Reply via email to