首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pyinstaller windowed和noconsole不工作

Pyinstaller windowed和noconsole不工作
EN

Stack Overflow用户
提问于 2018-03-10 15:41:16
回答 1查看 364关注 0票数 1

我使用的是pyinstaller 3.3.1和python 3.6。我的问题是我不能在无控制台和窗口模式下运行pyinstaller脚本。我的项目是一个使用Django 1.9构建的web应用程序。错误日志:

代码语言:javascript
复制
    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
EN

回答 1

Stack Overflow用户

发布于 2018-11-20 22:15:54

Pyinstaller与python 3.6不兼容,我也遇到了同样的问题,在一些研究之后,我发现pyinstaller只支持python 3.4,而且您的错误日志显示

代码语言:javascript
复制
django.template.exceptions.TemplateDoesNotExist: helpers/error.html

您必须在pyinstaller中使用"--add-data"参数手动添加该HTML文件

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49206585

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档