Hi, I was trying to load a simple python script in the CUBIT journal editor, but when I clicked ‘run’ it gave me tons of IndentationError ever since the second indented line like shown below. Any trick to avoid it?
Thanks.
What version of Coreform Cubit are you running? There was a bug in prior versions that did not allow a blank line. I used to work around that by placing a # on the blank lines.
Also, make sure you are in python mode in the journal editor.
Thanks. I am using CUBIT 15.2. And there is no blank line in the script. Here is a screen shot of the journal editor, is that in a correct mode?
I tested with an even simpler script as attached and it seemed it could not pick a second line in the indentation. Is this a bug of the version I used? Seems not reasonable at all.
Here is a comment from one of the developers.
The indentation error may happen because the file has different indents than what was previously run in the user python space. 15.2 has an older python and it might not be as flexible as the current python. The user might have to use 2 spaces for the indent, since we might have sent some python commands with an indent from the application startup.
Based on this, try using two spaces. Are you using tabs instead of spaces? Maybe just try using spaces and no tabs.
Thanks. Using double space instead of tab key works.