Bazaar Explorer won't open after getting error while editing editors.conf

Asked by Brian Cox on 2012-03-12


One of our Bazaar users ran into an issue this morning that I hope someone can help with.

There is one particular file type that we have had a little trouble with when trying to open the file from the modified/added/etc list in the main pane of Bazaar Explorer. In trying to resolve this he made a change, got an error and Bazaar Explorer gave an error with the option to ignore/close. He closed and now Bazaar explorer wouldn't open again. Some details from the user:

I was editing editors.conf. I added the following line to it:

uxf = "C:\Users\Ray.Hendrey\bin\test_cmd_parms.bat %(root)s %branch_root"

The test_cmd_parms.bat is just a batch file that echoes the command line parameters to a text file, along with the environmental variables that are set. I am trying to get it to open the UXF files when I click on one in the status report. I have determined that the file name supplied to the command begins with docs/, so it is relative to the beginning of the current working tree. I was trying to find out if there is a variable that will allow me to specify that. I was using as guidance. It contains the line " Placeholders are included using the format %(name)s. To include a real % in an action, use %%", and I was trying through experimentation, to find out what %(names)s means. Anyways, here is the error message.

 I have attached the screenshot with the error.

He tried a couple of other things to try to get it to open again:

I removed the s, so the line now reads: uxf = "C:\Users\Ray.Hendrey\bin\test_cmd_parms.bat %(root) %branch_root"
and it starts, but it takes 20 seconds or so for the GUI to show up. It may still be logging errors.... removing the "%(root) %branch_root" part does not seem to speed it up any.

Here is the system.log information since his last "clean" startup:

Mon 2012-03-12 09:12:41 -0700
0.047 bazaar version: 2.3.1
0.047 bzr arguments: [u'explorer']
0.062 looking for plugins in C:/Users/ray.hendrey/AppData/Roaming/bazaar/2.0/plugins
0.062 looking for plugins in C:/Program Files (x86)/Bazaar/plugins
0.125 encoding stdout as osutils.get_user_encoding() 'cp1252'
0.234 loading explorer extensions for clothes [u'Bazaar support', u'Register on Launchpad']
0.234 explorer extensions provided by the colo plugin in C:/Program Files (x86)/Bazaar/plugins/colo/explorer
0.265 Traceback (most recent call last):
File "bzrlib\commands.pyo", line 926, in exception_to_return_code
File "bzrlib\commands.pyo", line 1126, in run_bzr
File "bzrlib\commands.pyo", line 691, in run_argv_aliases
File "bzrlib\commands.pyo", line 713, in run
File "bzrlib\cleanup.pyo", line 135, in run_simple
File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\", line 162, in run
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\", line 204, in __init__
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\", line 818, in init_hats
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\", line 823, in refresh_menus
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\", line 834, in _refresh_custom_editors
File "C:/Program Files (x86)/Bazaar/plugins\explorer\lib\extensions\", line 396, in custom_editors
File "bzrlib\util\configobj\configobj.pyo", line 736, in items
File "bzrlib\util\configobj\configobj.pyo", line 746, in values
File "bzrlib\util\configobj\configobj.pyo", line 589, in __getitem__
File "bzrlib\util\configobj\configobj.pyo", line 582, in _interpolate
File "bzrlib\util\configobj\configobj.pyo", line 389, in interpolate
File "bzrlib\util\configobj\configobj.pyo", line 367, in recursive_interpolate
File "bzrlib\util\configobj\configobj.pyo", line 453, in _parse_match
File "bzrlib\util\configobj\configobj.pyo", line 423, in _fetch
MissingInterpolationOption: missing option "root" in interpolation.

Any help you can offer would be much appreciated!


Question information

English Edit question
Bazaar Explorer Edit question
No assignee Edit question
Solved by:
Alexander Belchenko
Last query:
Last reply:
Alexander Belchenko (bialix) said : #1

Brian, this is really should be a question. You can ask questions in QBzr mailing list:
or using Answers section on Launchpad:

Alexander Belchenko (bialix) said : #2

According to comments in original editors.conf you should list file extensions and according to the instructions in you mustn't use any placeholders in the editors.conf, only filename/path of the editor

# Editor applications for various file extensions on various desktops.
# A DEFAULT section can be given providing cross-platform defaults.
# The recognised desktop names are gnome, kde, windows and osx.
# Within each section, the key is a comma separated list of file
# extensions and the value is the name of the application to edit
# the file with. For example:
# doc, xls, ppt = ooffice
# [windows]
# vsd, vss, vst, vdx, vsx, vtx = visio

So, in your case the settings should be

uxf = "C:\Users\Ray.Hendrey\bin\test_cmd_parms.bat"

And Explorer will run "editor" for "uxf" as

"C:\Users\Ray.Hendrey\bin\test_cmd_parms.bat" /path/to/selected/file

Brian Cox (brian-cox) said : #3

I agree that we may have been using it in an unintended way (we were trying this because the application requires the entire path to the file), but since this causes Bazaar Explorer to crash and not be able to be reopened until the editors.conf file has been changed back, wouldn't that be a bug? Some type of error message about *why* Bazaar Explorer isn't opening would be nice, at a minimum.

Best Alexander Belchenko (bialix) said : #4

Yes, this is the bug. Could you file a new specific bug report related to this fact or edit your old one to clearly specify what's the problem.

Brian Cox (brian-cox) said : #5

Thanks Alexander Belchenko, that solved my question.