I am trying to re-use some octave code (in 1 .m file) in a short python script using oct2py. The python script runs correctly from the cmd console. I can even package it into an exe using pyinstaller (no Errors, only a few warnings), but when I run it the executable throws this error and quits:
---
C:\Users\Jason\Desktop\Oct2Py test>readFolder.exe
Traceback (most recent call last):
File "readFolder.py", line 2, in <module>
from oct2py import octave
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\oct2py\__init__.py", line 26, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\oct2py\core.py", line 14, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\octave_kernel\kernel.py", line 49, in <module>
File "site-packages\octave_kernel\kernel.py", line 54, in OctaveKernel
File "site-packages\octave_kernel\kernel.py", line 43, in get_kernel_json
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\toshiba\\AppData\\Local\\Temp\\_MEI94962\\octave_kernel\\kernel.json
[5220] Failed to execute script readFolder
I have the latest versions of python(3.7.1), oct2py(4.0.6), pyinstaller, etc. installed
It feels like I'm missing something or not connecting something someplace here, can anyone help me out with it? Thanks!