I am trying to use oct2py to run octave script(.m file) in python. here is the code
import os
os.environ['OCTAVE_EXECUTABLE'] = ('C:\\Program Files\\GNU Octave\\Octave-6.2.0\\mingw64\\bin\\octave-cli.exe')
import oct2py
out = oct2py.Oct2Py()
out.source('main.m')
it runs my .m file and shows the results also but after that I receive following error.
error: 'sentinel' undefined near line 99, column 99
error: called from
_pyeval at line 99 column 10
whats going wrong here?
I was having the same issue. It was resolved when I got rid of all clear all
and close
statements. Although I suspect clear
to be the culprit.
This seems to be a known problem https://github.com/blink1073/oct2py/issues/185, which is your own post. Ah well ;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With