Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python ';OSError:[WinError 6]句柄无效';在PySimpleGUI中使用'-w';在Pyinstaller中,语音识别和Pyttsx3_Python_User Interface_Pyinstaller_Pysimplegui - Fatal编程技术网

Python ';OSError:[WinError 6]句柄无效';在PySimpleGUI中使用'-w';在Pyinstaller中,语音识别和Pyttsx3

Python ';OSError:[WinError 6]句柄无效';在PySimpleGUI中使用'-w';在Pyinstaller中,语音识别和Pyttsx3,python,user-interface,pyinstaller,pysimplegui,Python,User Interface,Pyinstaller,Pysimplegui,所以我用PySimpleGUI创建了一个程序,然后用PySimpleGUI创建了一个.exe文件。这是我的命令: pyinstaller--hidden import=pyttsx3.drivers--hidden import=pyttsx3.drivers.dummy--hidden import=pyttsx3.drivers.nsss--hidden import=pyttsx3.drivers.sapi5-F-w-i“C:\Users\icons\logo.ico”prog.py -F

所以我用PySimpleGUI创建了一个程序,然后用PySimpleGUI创建了一个.exe文件。这是我的命令:

pyinstaller--hidden import=pyttsx3.drivers--hidden import=pyttsx3.drivers.dummy--hidden import=pyttsx3.drivers.nsss--hidden import=pyttsx3.drivers.sapi5-F-w-i“C:\Users\icons\logo.ico”prog.py

-F代表一个文件程序
-w用于窗口应用程序(无命令提示)
-图标的i值
顺便说一句,如果我不使用'-w',它会工作得很好,但我希望应用程序不使用cmd
我的代码:

我得到一个错误:

'OSError: [WinError 6] The handle is invalid'
'OSError: [WinError 6] The handle is invalid'