Reindent Results in Error

I have a small TCL file and attempted to “Code/Format/Reindent” my file and I get the following error. I have used this option before so something has changed and I do not know what it is.
How can I fix this?

[2015-08-20 09:26:34,798] [ERROR] run: This command string includes '%(python)', but no 'python' interpreter could be found. You can configure this by visiting the Python preferences panel in Edit->Preferences.
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 651, in Interpolate1
    indentReplacement=False)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 566, in _doInterpolate1
    replacement = replacement()
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 174, in <lambda>
    'python': lambda  interp='python',  lang='Python':  self._GetInterpreter(interp, lang, prefSet),
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 103, in _GetInterpreter
    % (interp, interp, lang))
ValueError: This command string includes '%(python)', but no 'python' interpreter could be found. You can configure this by visiting the Python preferences panel in Edit->Preferences.
[2015-08-20 09:26:34,798] [ERROR] run: 2147942487 (This command string includes '%(python)', but no 'python' interpreter could be found. You can configure this by visiting the Python preferences panel in Edit->Preferences.)
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 665, in Interpolate1
    ex.args[0])
ServerException: 2147942487 (This command string includes '%(python)', but no 'python' interpreter could be found. You can configure this by visiting the Python preferences panel in Edit->Preferences.)
ERROR:xpcom:Unhandled exception calling 'int8 * format(in nsISomething);'
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\python\xpcom\server\policy.py", line 300, in _CallMethod_
    return 0, func(*params)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koGenericFormatter.py", line 85, in format
    context.prefset)
  File "<XPCOMObject method 'Interpolate1'>", line 3, in Interpolate1
Exception: 2147942487 (NS_ERROR_ILLEGAL_VALUE)

Have you tried doing what the error suggested?

This command string includes ‘%(python)’, but no ‘python’ interpreter could be found. You can configure this by visiting the Python preferences panel in Edit->Preferences.

I don’t see any
Python preferences panel in Edit->Preferences
and I did not expect to be required to manually install anything for basic functionality to work. I am not sure why this feature worked before but I know I never did anything specifically to enable it.
It could be that I have python in Cygwin at one time and since I regularly change Cygwin I may not have python there now.
It is just very confusing to have this error message.
FYI,
I do see Python preferences panel in Edit->Preferences->Languages->Python
and I do see a similar message about Python not being installed.
I will follow the suggested ActiveState ActivePython installation to see if that resolves my problem.

Thanks,
Tom

Possibly you were using it with a different language before? Different languages use different formatting libraries.

I am not using Python. Never have, probably never will. So now the question is
Why do I need Python to re-indent a TCL file?

I’m just going by the log that you posted. Perhaps you could share the full error log?

@nathanr No clue if the %(python) thing is meaningful either, but since it’s coming from IDE code, I thought I’d ask a dumb question about this line in the log from above:

  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koGenericFormatter.py", line 85, in format
    context.prefset)
  • Is koGenericFormatter.py's format function making a call using %(python)?
  • Could some bit of IDE code somewhere be hard-coded to use that formatted string?

If none of the above, I’d guess it’s an extension problem… Still, seeing the “missing python” error coming from a format function is :fish:y. (Fishies everywhere!)

The log does not accumulate nor does it save old logs. Each time I restart the log is new so now that I have Python installed I do not get the error.
I did however rename the Python directory in order to recreate the error. I am going to attach the full log for startup/open file/format - reindent of the same file.
Don’t see an option to add an attachment so here is the text from the log.

[2015-08-21 07:56:26,849] [INFO] Startup: Welcome to Komodo IDE 9.1.0 build 87337 (platform win32-x86, running on Windows 7 version 6.1.7601)
[2015-08-21 07:56:26,849] [INFO] Startup: C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\komodo.exe built on Fri May 29 18:45:28 2015
[2015-08-21 07:56:28,832] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in resource://gre/modules/Preferences.jsm:381
[2015-08-21 07:56:28,832] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'component' directive. (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%209/lib/mozilla/extensions/scope-files@activestate.com/components/component.manifest:1
[2015-08-21 07:56:28,832] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'contract' directive. (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%209/lib/mozilla/extensions/scope-files@activestate.com/components/component.manifest:2
[2015-08-21 07:56:28,832] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'interfaces' directive. (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%209/lib/mozilla/extensions/scope-files@activestate.com/components/component.manifest:3
[2015-08-21 07:56:28,910] [WARNING] root: ko.logging has been converted to a CommonJS module; use require("ko/logging") instead (since Komodo 9.0.0a1).
    @chrome://komodo/content/komodo.js:15:1

[2015-08-21 07:56:30,017] [WARNING] console-logger: Unknown property 'border-radius-top-left'.  Declaration dropped. (1) in less://commando/skin/commando.less:19
[2015-08-21 07:56:30,017] [WARNING] console-logger: Unknown property 'border-radius-top-right'.  Declaration dropped. (1) in less://commando/skin/commando.less:20
[2015-08-21 07:56:30,674] [ERROR] console-logger: bad script XDR magic number (0) in :0
Traceback (most recent call last):
  File "", line 0, in 

[2015-08-21 07:56:30,986] [WARNING] keybindings: [Ctrl+Shift+U] was used for 'cmd_convertLowerCase', overriding to use 'cmd_scope-sections'
[2015-08-21 07:56:33,934] [WARNING] root: ko.findresults was already loaded, re-creating it.

[2015-08-21 07:56:34,028] [DEBUG] places_js: waiting for document complete
[2015-08-21 07:56:37,476] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in file:///C:/Program%20Files%20(x86)/ActiveState%20Komodo%20IDE%209/lib/mozilla/components/koamAddonManager.js:138
[2015-08-21 07:56:46,528] [ERROR] console-logger: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFile.isFile] (2) in chrome://breadcrumbs/content/breadcrumbs.js:1493
Traceback (most recent call last):
  File "chrome://breadcrumbs/content/breadcrumbs.js", line 1493, in 

[2015-08-21 07:56:59,088] [ERROR] run: This command string includes '%(python)', but no 'python' interpreter could be found. You can configure this by visiting the Python preferences panel in Edit->Preferences.
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 651, in Interpolate1
    indentReplacement=False)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 566, in _doInterpolate1
    replacement = replacement()
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 174, in <lambda>
    'python': lambda  interp='python',  lang='Python':  self._GetInterpreter(interp, lang, prefSet),
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 103, in _GetInterpreter
    % (interp, interp, lang))
ValueError: This command string includes '%(python)', but no 'python' interpreter could be found. You can configure this by visiting the Python preferences panel in Edit->Preferences.
[2015-08-21 07:56:59,104] [ERROR] run: 2147942487 (This command string includes '%(python)', but no 'python' interpreter could be found. You can configure this by visiting the Python preferences panel in Edit->Preferences.)
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koRunService.py", line 665, in Interpolate1
    ex.args[0])
ServerException: 2147942487 (This command string includes '%(python)', but no 'python' interpreter could be found. You can configure this by visiting the Python preferences panel in Edit->Preferences.)
ERROR:xpcom:Unhandled exception calling 'int8 * format(in nsISomething);'
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\python\xpcom\server\policy.py", line 300, in _CallMethod_
    return 0, func(*params)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koGenericFormatter.py", line 85, in format
    context.prefset)
  File "<XPCOMObject method 'Interpolate1'>", line 3, in Interpolate1
Exception: 2147942487 (NS_ERROR_ILLEGAL_VALUE)
[2015-08-21 07:57:07,013] [WARNING] views: Inconsistent view count in view_closed event
[2015-08-21 07:57:07,233] [ERROR] codeintel.komodo.KoCodeIntelManager: Error reading data from codeintel
Traceback (most recent call last):
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\components\koCodeIntel.py", line 1161, in run
    ch = self.pipe.read(1)
  File "C:\Program Files (x86)\ActiveState Komodo IDE 9\lib\mozilla\python\komodo\win32_named_pipe.py", line 212, in read
    raise ctypes.WinError(ctypes.get_last_error())
WindowsError: [Error 109] The pipe has been ended.

BTW,
When I performed the indent I was very disappointed in that all it did was add a full tab to every single line. More attempts just added more tabs. This is not “reindenting”!

Thanks guys, I’ve opened two issues for the subjects discussed here:

I am not certain both are valid issues as I do not currently have time to verify them, but we’ll be sure to look into them soon.