I am trying to make a python executable which uses oct2py to eval a .m file. The python script works just fine independently. I have been successful in using pyinstaller to make an executable (using --onefile, no errors in building it), but when I run this executable I get the following error and the executable quits:
C:\Users\Jason\Desktop\Oct2Py test>readFolder.exe
error: '_pyeval' undefined near line 1 column 1
Traceback (most recent call last):
File "site-packages\scipy\io\matlab\mio.py", line 33, in _open_file
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Jason/AppData/Local/Temp/tmpbn8aefsj/reader.mat'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "readFolder.py", line 8, in <module>
octave.eval('pkg load io')
File "site-packages\oct2py\core.py", line 484, in eval
File "site-packages\oct2py\core.py", line 369, in feval
File "site-packages\oct2py\core.py", line 565, in _feval
File "site-packages\oct2py\io.py", line 28, in read_file
File "site-packages\scipy\io\matlab\mio.py", line 141, in loadmat
File "site-packages\scipy\io\matlab\mio.py", line 64, in mat_reader_factory
File "site-packages\scipy\io\matlab\mio.py", line 39, in _open_file
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/Jason/AppData/Local/Temp/tmpbn8aefsj/reader.mat'
[1456] Failed to execute script readFolder
It appears the issue is first with 'mio.py', but I cannot figure out where it's looking for 'reader.mat'. I think 'reader.mat' is some sort of temporary file created by oct2py.
Just to be sure the python script runs correctly and evaluate the whole oct2py referenced .m file correctly.
Thanks
python 3.7, pyinstaller 3.5 dev, oct2py 4.0.6.