Indentation problem in some files

Ever since I installed Komodo10, I’ve had a problem where I periodically get 24 spaces per tab in my Python files. I believe I fixed this once by performing “reset everything”. I’m not sure if that was what fixed it since I tried nuking alot of different files. The problem came back yesterday. This time it’s only affecting one file.

“Reset file preferences” and “reset caches” did not fix it.

My tab settings in Editor=>Preferences=>Indentation are:

  • preferet tab characters over spaces
  • [4] spaces per indent
  • [4] width of each tab

Edit=>Current file preferences shows the same settings.


What about per-language indentation settings?

Per Language Indentation Settings:

  • prefer tab characters over spaces
  • [4] Number of spaces per indent
  • [4] Width of each Tab character

Hmm, open bottom pane, Console tab, run this code:


Also, what version are you using? (Help - About Komodo)

The output from that command is “Number 4”

10.0.1 build 89222

Are you able to reproduce it inside Safe Mode? (Help - Troubleshooting - Restart in Safe Mode)

yes, I was able to reproduce it inside Safe Mode.

Could you share this file? If you’re not able to reproduce this in other files, then there’s something wrong with this one.

Also you could try to disable this checkbox and re-open your file again:

And what do you use? Tabs or spaces?

The problem is still present after unchecking that checkbox. I use tabs.

When I open the problem file in Visual Studio the indentation is identical to every other file. It may be unrelated but I once had this problem on other files in Komodo 8.5 but I was able to see a setting of 23 (or something like that) when I opened ‘current file preferences’.

How can I share the file with you?

Upload it somewhere, Dropbox for example.

I can email the file to someone at ActiveState.

Then you have to wait for someone from ActiveState.

ping @careyh

@Gewurtzraminer also, please share your log file. (Help - Troubleshooting - View Log File). You can post it right there.

I guess so, thanks for your help so far :slight_smile:

Can you create a file with this problem? Or is it literally specific to that one file? (e.g. copy pasting all content from the problematic file into a new one doesn’t exhibit this problem; note I’d recommend using another program to do the copy-paste just to be safe)

  • I did a copy/paste in explorer to create “”, opened it in komodo, and see the same indentation problem
  • Next I opened the file in visual studio, did a select all, opened, pasted the file contents, and opened it in Komodo. The indentation is still at 24 spaces per tab.
  • Another test I performed: open the file in Komodo, select all, copy, file=>new file, and paste. The indentation looks good at this point. If i perform save-as to the indentation goes back to big tabs.



What language do you use? Python or Python 3? Is this file under a project? You may want to check out Project prefs as well.

I’m using Python 2.7 at the moment.

Edit Menu => Preferences

Project Menu => Preferences

What about the logs? (Help - troubleshooting - view log file).

Also, try to execute this code in the console tab: require('ko/editor').scimoz().indent.

Number 23

Holy moly… I don’t know what’s going on there, but you can change it.
require('ko/editor').scimoz().indent = 4.

Are you sure your language is NOT Python 3? Have a look at right bottom of Komodo window.