简体   繁体   English

Pyinstaller窗口化且noconsole无法正常工作

[英]Pyinstaller windowed and noconsole is not working

I'm using pyinstaller 3.3.1 and python 3.6.My problem is I cant run pyinstaller script in both no-console and windowed mode. 我正在使用pyinstaller 3.3.1和python 3.6。我的问题是我无法在无控制台和窗口模式下运行pyinstaller脚本。 My project is a web application built using Django 1.9. 我的项目是一个使用Django 1.9构建的Web应用程序。 Error Log: 错误日志:

    Error: [<class 'OSError'>, OSError(9, 'The handle is invalid', None, 6, None), <traceback object at 0x03B098A0>]
    Traceback (most recent call last):
  File "site-packages\django\core\handlers\base.py", line 149, in get_response
  File "site-packages\django\core\handlers\base.py", line 147, in get_response
  File "crumbs_tableau\views.py", line 1603, in parser
  File "site-packages\django\shortcuts.py", line 67, in render
  File "site-packages\django\template\loader.py", line 96, in render_to_string
  File "site-packages\django\template\loader.py", line 43, in get_template
django.template.exceptions.TemplateDoesNotExist: helpers/error.html
Internal Server Error: /
Traceback (most recent call last):
  File "crumbs_tableau\views.py", line 286, in parser
  File "crumbs_tableau\views.py", line 248, in mac_list
  File "subprocess.py", line 336, in check_output
  File "subprocess.py", line 403, in run
  File "subprocess.py", line 667, in __init__
  File "subprocess.py", line 905, in _get_handles
  File "subprocess.py", line 955, in _make_inheritable
OSError: [WinError 6] The handle is invalid

Pyinstaller is not compatable with python 3.6 i was also getting the same issue and after some research i found that pyinstaller is only supported upto python 3.4 also your error logs is showing that Pyinstaller与python 3.6不兼容我也遇到了同样的问题,经过一些研究,我发现pyinstaller仅在python 3.4之前受支持,而且您的错误日志显示

django.template.exceptions.TemplateDoesNotExist: helpers/error.html

that HTML file is missing which you have to add manually with "--add-data" param in pyinstaller 该HTML文件丢失,您必须在pyinstaller中使用"--add-data"参数手动添加

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM