logging

Komodo file locations

Question: 

Where can I find the Komodo files?

Answer: 

Where is Komodo installed?

The default location varies by platform, and the name of the directory corresponds to the version of Komodo you are running ("IDE" or "Edit" plus the version number - e.g. "Komodo IDE 8"):

  • Windows
    C:\Program Files\ActiveState Komodo [IDE|Edit] <version>\
  • Linux
    /opt/Komodo-[IDE|Edit]-<version>/
  • OS X
    /Applications/Komodo-[IDE|Edit]-<version>.app

Where does Komodo keep settings data?

Komodo stores preferences, macros, templates, keybinding schemes and other settings in a user-specific directory called the user data directory. The name and location of this directory varies depending on the operating system and Komodo version:

  • Windows Vista, Windows 7, Windows 8 or newer
    C:\Users\<user>\AppData\Local\ActiveState\Komodo[IDE|Edit]\<version>
  • Windows XP or older
    C:\Documents and Settings\<username>\Local Settings\Application Data\ActiveState\Komodo[IDE|Edit]\<version>
  • Linux
    /home/<user>/.komodo[ide|edit]/<version>
  • Mac OS X
    /Users/<user>/Library/Application Support/Komodo[IDE|Edit]/<version>

You can find more details about the contents of the profile directory here:
http://community.activestate.com/faq/komodo-profile-structure

The location of this directory can be overridden using the KOMODO_USERDATADIR environment variable, see:
http://community.activestate.com/faq/multiple-instances-komodo

Where does Komodo log output and errors?

Note: In Komodo 6, you can use the "Help->Trouble Shooting->View log file" menu command to quickly examine Komodo's main log file ("pystderr.log").

There are two files named "pystderr.log" and "pystdout.log" within your Komodo user data directory. These files are extremely useful for troubleshooting problems with Komodo and are often requested when logging bug reports.

  • Windows Vista, Windows 7, Windows 8 or newer
    C:\Users\<user>\AppData\Local\ActiveState\Komodo[IDE|Edit]\<version>\pystd[err|out].log
  • Windows XP or older
    C:\Documents and Settings\<username>\Local Settings\Application Data\ActiveState\Komodo[IDE|Edit]\<version>\pystd[err|out].log
  • Linux
    /home/<user>/.komodo[ide|edit]/<version>/pystd[err|out].log
  • Mac OS X
    /Users/<user>/Library/Application Support/Komodo[IDE|Edit]/<version>/pystd[err|out].log

How do I reset Komodo's preferences to the default settings?

Warning: This will reset a lot of preference information, including opened files, recent files, projects and toolbox, additional installed extensions, customized Komodo preferences, etc... So make sure you backup the folder instead of simply deleting it, this way you can easily restore your settings.

Your preferences should be reset.

Note 1: If you have older Komodo preferences from before Komodo 4.0, these will be applied on-top of the default preferences as part of a Komodo upgrade process, so for a total default/fresh set of preferences you will need to rename the older komodo directory as well.

Note 2: You can also use a completely different Komodo user data directory, see below.

How can I change Komodo's profile storage location

You can use a completely custom Komodo user data (profile) directory by setting the KOMODO_USERDATADIR variable in your environment settings before starting Komodo.

Example:
export KOMODO_USERDATADIR=/tmp/komodoide

Python logging package doesn't work when I run in Komodo

Question: 

The documentation states that logging.basicConfig() will take arguments as of Python 2.4, but when I run my script from Komodo, Python says that it should not be given arguments.

Answer: 

The documentation states that logging.basicConfig() will take arguments (new to 2.4), however if this is used in the interpreter it will throw an exception, reporting back that no arguments are allowed.

From documentation (section 6.29.2):
Changed in version 2.4: formerly basicConfig did not take any keyword arguments.

However:

import logging
logging.basicConfig( level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s',
 filename="Testing", filemode="w" )
Traceback (most recent call last):
  File "C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp\pythonlib\dbgp\client.py",
 line 3241, in runcode
    locals = self.frame.f_locals)
  File "C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp\pythonlib\dbgp\client.py", 
line 1583, in runcode
    h_exec(code, globals=globals, locals=locals, module=module)
  File "C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp\pythonlib\dbgp\client.py", 
line 520, in __init__
    exec code in globals, locals
  File "", line 0, in __main__
TypeError: basicConfig() takes no arguments (4 given)

System:
Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on win32

The problem is that the MSI installer did not uninstall all of the files. Specifically, the directory C:\Program Files\ActiveState Komodo 3.5\lib\support\dbgp\pythonlib\logging should have been removed. Removing this directory will fix the problem.