Horrible indentation in the openMV IDE

Hi everyone, I’m not sure if I’m the only one experiencing this, but I’ve been getting a lot of very strange and frustrating indentation error messages, such as this one for example:
image
I can’t even find the problem here anymore, I’ve made sure that they are all tabs and not 4 spaces (which was a problem before because the indent would be shown as 4 dots instead of a right arrow, but that was easily fixable). Now its just throwing me indentation errors when there are none (I copied it into another IDE to confirm).

Here are my editor settings:


Does anyone know how to fix this or if its just a bug with the IDE? Its honestly very frustrating.

Edit: found the problem, it was that the line below it had an extra space after the tab. But still, this isn’t the first time I’ve had an indentation problem in this IDE, it is still extremely sensitive and finnicky and still remains a problem (such as not being able to add an empty line within indented blocks, or else it’ll mess up the following line’s indentation), so my question still stands - how can this be fixed?

Hi, the camera cares about the indentation, not the IDE. It’s parsing the program that is sent by the IDE.

As for fixing the IDE. Yes, I’m going to be replacing the current logic in it with a fully supported python parsing system. So, this behavior will not last forever. The Qt folks added full Python Intelliscene support to QtCreator which I just need to bring into the IDE.

(such as not being able to add an empty line within indented blocks, or else it’ll mess up the following line’s indentation)

Can you share an example of that? The default settings for a brand-new IDE should provide a decent experience. The IDE isn’t smart enough, though, to know when to remove an indent. But, it should keep the current level.

That’s great, can’t wait to see what’s in store!

As for the empty line issue, here’s how I reproduce it: inside an indented code block, example a for loop, while loop or if statement, sometimes if it gets too long I tend to add a blank line just to segment the code abit. Once I add an empty line, and save the file, it causes the next line’s indentation to turn into 4 spaces from a tab, then gives an error saying its the wrong indentation level. This will keep happening everytime you save the file, so you can only either remove the empty line, or never save the file. Saving also sometimes misaligns the indentation of lines before and after an empty line, it’s a bit random and infrequent though.

There’s also other glitchy things that happen but I can’t remember off the top of my head right now, I’ll update this thread once I recall and provide how to reproduce it.

Yeah, you should turn off the tabs only setting you have on. Please uses spaces only.

If you have the IDE converting between tabs and spaces constantly it’s going to do something wrong.

I see, I’ll give that a try and see if it fixes the issue. I personally prefer tabs just because it’s what I’m accustomed to and it’s quicker to use arrow keys to scroll by as it’s only one thing instead of 4.