dmulyalin / ttp

Template Text Parser
MIT License
350 stars 34 forks source link

error in exe compiled via pyinstaller #78

Open himynameissergey opened 2 years ago

himynameissergey commented 2 years ago

if I compile the script via pyInstaller, then when I run the exe file, an error occurs on the line parser = ttp(data=SASData, template=SASTemplate)

ttp.lazy_import_functions: failed to save cache at 'C:\Users\User\AppData\Local\Temp\_MEI84082\ttp\ttp_dict_cache.pickle', error '[Errno 2] No such file or directory: 'C:\\Users\\User\\AppData\\Local\\Temp\\_MEI84082\\ttp\\ttp_dict_cache.pickle''
Traceback (most recent call last):
  File "Template Text Parser.py", line 218, in <module>
    parser = ttp(data=SASData, template=SASTemplate)
  File "ttp\ttp.py", line 246, in __init__
  File "ttp\ttp.py", line 366, in add_template
KeyError: 'utils'
[14736] Failed to execute script 'Template Text Parser' due to unhandled exception!

If I run the script via the interpreter, then no error occurs, the script works fine

ttp 0.9.0 python 3.9.7 Windows 10 21H1 build 19043, 1766

scottpeterman commented 2 years ago

I also would like to use the ttp cli tool as a packaged .exe - is there some other way you have seen it work (pyinstaller, cx_freeze, py2exe etc)?

himynameissergey commented 2 years ago

no cx_freeze, py2exe - i didn't try to use i tried only pyinstaller, got error and didn't try anything else