Karan Sohal
Karan Sohal

Reputation: 41

sentinel error occurred while executing oct2py in python for running octave script

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?

Upvotes: 4

Views: 364

Answers (2)

Karan Sohal
Karan Sohal

Reputation: 41

https://github.com/blink1073/oct2py/issues/185 Here is the link regarding this thread. It's all due to "clear".

Upvotes: 0

philbox2
philbox2

Reputation: 187

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 ;)

Upvotes: 2

Related Questions