简体   繁体   中英

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?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM