Guest User

Untitled

a guest
Jan 22nd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.51 KB | None | 0 0
  1. To reproduce:
  2. <ol>
  3. <li>Download the gist</li>
  4. <li>Install the pyttsx3 Python library</li>
  5. <li>
  6. Run the code normally.
  7. <pre><code>>python tts_test.py
  8. It works</code></pre>
  9. </li>
  10. <li>
  11. Build with PyInstaller:
  12. <pre><code>>python -m pyinstaller tts.spec
  13. Build exits without warnings or errors</code></pre>
  14. </li>
  15. <li>
  16. Run the executable:
  17. <pre><code>>dist\main\TTS_Test.exe
  18. [13544] PyInstaller Bootloader 3.x
  19. [13544] LOADER: executable is C:\Users\Alexandre\Desktop\tts_test\dist\main\TTS_Test.exe
  20. [13544] LOADER: homepath is C:\Users\Alexandre\Desktop\tts_test\dist\main
  21. [13544] LOADER: _MEIPASS2 is NULL
  22. [13544] LOADER: archivename is C:\Users\Alexandre\Desktop\tts_test\dist\main\TTS_Test.exe
  23. [13544] LOADER: No need to extract files to run; setting extractionpath to homepath
  24. [13544] LOADER: SetDllDirectory(C:\Users\Alexandre\Desktop\tts_test\dist\main)
  25. [13544] LOADER: Already in the child - running user's code.
  26. [13544] LOADER: Python library: C:\Users\Alexandre\Desktop\tts_test\dist\main\python27.dll
  27. [13544] LOADER: Loaded functions from Python library.
  28. [13544] LOADER: Manipulating environment (sys.path, sys.prefix)
  29. [13544] LOADER: sys.prefix is C:\Users\ALEXAN~1\Desktop\tts_test\dist\main
  30. [13544] LOADER: Setting runtime options
  31. [13544] LOADER: Initializing python
  32. [13544] LOADER: Overriding Python's sys.path
  33. [13544] LOADER: Post-init sys.path is C:\Users\Alexandre\Desktop\tts_test\dist\main
  34. [13544] LOADER: Setting sys.argv
  35. [13544] LOADER: setting sys._MEIPASS
  36. [13544] LOADER: importing modules from CArchive
  37. [13544] LOADER: extracted struct
  38. [13544] LOADER: callfunction returned...
  39. [13544] LOADER: extracted pyimod01_os_path
  40. [13544] LOADER: callfunction returned...
  41. [13544] LOADER: extracted pyimod02_archive
  42. [13544] LOADER: callfunction returned...
  43. [13544] LOADER: extracted pyimod03_importers
  44. [13544] LOADER: callfunction returned...
  45. [13544] LOADER: Installing PYZ archive with Python modules.
  46. [13544] LOADER: PYZ archive: out00-PYZ.pyz
  47. [13544] LOADER: Running pyiboot01_bootstrap.py
  48. [13544] LOADER: Running pyi_rth_win32comgenpy.py
  49. [13544] LOADER: Running tts_test.py
  50. Traceback (most recent call last):
  51. File "C:\Users\Alexandre\Desktop\tts_test\tts_test.py", line 3, in <module>
  52. engine = pyttsx3.init()
  53. File "C:\Python27\lib\site-packages\pyttsx3\__init__.py", line 46, in init
  54. eng = Engine(driverName, debug)
  55. File "C:\Python27\lib\site-packages\pyttsx3\engine.py", line 52, in __init__
  56. self.proxy = driver.DriverProxy(weakref.proxy(self), driverName, debug)
  57. File "C:\Python27\lib\site-packages\pyttsx3\driver.py", line 77, in __init__
  58. self._driver = self._module.buildDriver(weakref.proxy(self))
  59. File "C:\Python27\lib\site-packages\pyttsx3\drivers\sapi5.py", line 22, in buildDriver
  60. return SAPI5Driver(proxy)
  61. File "C:\Python27\lib\site-packages\pyttsx3\drivers\sapi5.py", line 31, in __init__
  62. SAPI5DriverEventSink)
  63. File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 317, in WithEvents
  64. gencache.EnsureModule(tla[0], tla[1], tla[3], tla[4], bValidateFile=0)
  65. File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 524, in EnsureModule
  66. module = MakeModuleForTypelib(typelibCLSID, lcid, major, minor, progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
  67. File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 291, in MakeModuleForTypelib
  68. makepy.GenerateFromTypeLibSpec( (typelibCLSID, lcid, major, minor), progressInstance=progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
  69. File "C:\Python27\lib\site-packages\win32com\client\makepy.py", line 286, in GenerateFromTypeLibSpec
  70. gencache.AddModuleToCache(info.clsid, info.lcid, info.major, info.minor)
  71. File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 554, in AddModuleToCache
  72. mod = _GetModule(fname)
  73. File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 633, in _GetModule
  74. mod = __import__(mod_name)
  75. File "c:\users\alexan~1\appdata\local\temp\tmpcpltk4\gen_py\C866CA3A-32F7-11D2-9602-00C04F8EE628x0x5x4.py", line 10, in <module>
  76. import win32com.client.CLSIDToClass, pythoncom, pywintypes
  77. File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 161, in load_module
  78. return self._importer.load_module(fullname, self._entry_name)
  79. File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
  80. exec(bytecode, module.__dict__)
  81. File "C:\Python27\lib\site-packages\pythoncom.py", line 2, in <module>
  82. import pywintypes
  83. File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 161, in load_module
  84. return self._importer.load_module(fullname, self._entry_name)
  85. File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
  86. exec(bytecode, module.__dict__)
  87. File "C:\Python27\lib\site-packages\win32\lib\pywintypes.py", line 2, in <module>
  88. import imp, sys, os
  89. File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 161, in load_module
  90. return self._importer.load_module(fullname, self._entry_name)
  91. File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 396, in load_module
  92. exec(bytecode, module.__dict__)
  93. File "C:\Python27\lib\os.py", line 120, in <module>
  94. from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep,
  95. ImportError: No module named path
  96. [13544] Failed to execute script tts_test
  97. [13544] LOADER: OK.
  98. [13544] LOADER: Cleaning up Python interpreter.</code></pre>
  99. </li>
  100. </ol>
Add Comment
Please, Sign In to add comment