clicompanion crashes on start with ValueError in _get()

Bug #801906 reported by Eliah Kagan on 2011-06-25
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CLI Companion
Medium
Unassigned

Bug Description

In https://answers.launchpad.net/clicompanion/+question/162693, jpalsu (https://launchpad.net/~q-launchpad-vers-64-9ox-net) reported that running clicompanion in a Terminal window inside a GNOME session on an Ubuntu 10.04 Lucid system crashes, producing this output:

using locale in system
Traceback (most recent call last):
  File "/usr/bin/clicompanion", line 56, in <module>
    run()
  File "/usr/lib/pymodules/python2.6/clicompanionlib/view.py", line 406, in run
    main_window = MainWindow()
  File "/usr/lib/pymodules/python2.6/clicompanionlib/view.py", line 361, in __init__
    tabs.add_tab(self, self.notebook)
  File "/usr/lib/pymodules/python2.6/clicompanionlib/tabs.py", line 54, in add_tab
    self.update_term_config(_vte)
  File "/usr/lib/pymodules/python2.6/clicompanionlib/tabs.py", line 123, in update_term_config
    config_scrollback = config.getint('terminal', 'scrollb')
  File "/usr/lib/python2.6/ConfigParser.py", line 340, in getint
    return self._get(section, int, option)
  File "/usr/lib/python2.6/ConfigParser.py", line 337, in _get
    return conv(self.get(section, option))
ValueError: invalid literal for int() with base 10: ''

There is a slight resemblance here to the traceback in bug 748878, but they don't seem to be the same crash. Line numbers are different, this traceback has some calls that one doesn't have, and that crash is an IndexError rather than a ValueError.

Related branches

tags: added: lucid
Marek Bardoński (bdfhjk) wrote :

I added patch, with should fix this issue (I can't reproduce it yourself).

(I contains some another changes, but it isn't important)

Please apply it (in clicompanion directory merged from trunk paste patch file and in console put patch -p1 < patch.patch) and test. If it not help, please write.

Changed in clicompanion:
status: New → In Progress
importance: Undecided → Medium

Thanks
but what and where is the "clicompanion directory merged from trunk".

Thanks

Sorry for technical answer.

1. Install bzr (sudo apt-get install bzr)
2. Create directory Clicompanion
3. In console go to this directory and put bzr brach lp:clicompanion
4. Apply patch using command patch -p1 < patch.patch (if it for some
reasons not work, try it also in clicompanionlib directory)
5. Put in console "sudo python setup.py install && clicompanion" and
test new patched version.

I am waiting for any news on this. Thanks for help.

Thanks but :

*help !!!

*

Sorry for technical answer.
1. Install bzr (sudo apt-get install bzr)
**OK**

2. Create directory Clicompanion
*Where ?*

3. In console go to this directory and put bzr brach lp:clicompanion
*root@jpalsu-desktop:/usr/share/clicompanion# bzr brach lp:clicompanion
bzr: ERROR: unknown command "brach"
root@jpalsu-desktop:/usr/share/clicompanion#
*

4. Apply patch using command patch -p1< patch.patch (if it for some
reasons not work, try it also in clicompanionlib directory)
*root@jpalsu-desktop:/usr/share/clicompanion# patch -p1< patch.patch
bash: patch.patch: Aucun fichier ou dossier de ce type
root@jpalsu-desktop:/usr/share/clicompanion#
*

5. Put in console "sudo python setup.py install&& clicompanion" and
test new patched version.
*root@jpalsu-desktop:/usr/share/clicompanion# sudo python setup.py install&& clicompanion
python: can't open file 'setup.py': [Errno 2] No such file or directory
root@jpalsu-desktop:/usr/share/clicompanion#
*

I am waiting for any news on this. Thanks for help.*
ABOVE*

Le 30/06/2011 11:20, bdfhjk - <email address hidden> a écrit :

> Sorry for technical answer.
>
> 1. Install bzr (sudo apt-get install bzr)
> 2. Create directory Clicompanion
> 3. In console go to this directory and put bzr brach lp:clicompanion
> 4. Apply patch using command patch -p1< patch.patch (if it for some
> reasons not work, try it also in clicompanionlib directory)
> 5. Put in console "sudo python setup.py install&& clicompanion" and
> test new patched version.
>
> I am waiting for any news on this. Thanks for help.

2:

You can create the clicompanion directory wherever you want. Reasonable places include inside your home directory or inside /usr/local/src. You might need to take ownership on /usr/local/src (or make it a sticky directory) to be able to create files and directories inside it. You can take ownership of /usr/local/src with the command "sudo chown $(whoami) /usr/local/src" (without the quotes).

/usr/share is a very strange place to create this directory, as the contents of /usr/share are typically files associated with installed programs (indepenedent of your processor type). See http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard for details. However, the steps given by bdfhjk will still work, even if you put the clicompanion directory in /usr/share.

3:

Type "bzr branch lp:clicompanion" (without the quotes) instead. "brach" was a typographic error.

4, 5:

These errors were becuase step 3 was not completed successfully. After using the corrected command above, you should be able to complete steps 4 and 5 without problems.

Marek Bardoński (bdfhjk) wrote :

Please write, if bug still appear.

Thanks.

Changed in clicompanion:
status: In Progress → Fix Committed
David Caro (dcaro) wrote :

This is caused by a corrupted config file (~/.config/clicompanion/config), when it reads the config from there, it expects to find an integer, but instead it founds nothing, a config file like this causes it:

  1 [terminal]
  2 scrollb =
  3 colorf = #FFFFFF
  4 colorb = #000000
  5 encoding = UTF-8

Tested it and it does not solve the problem, also problems whith the other config values when are incorrect or empty.

David Caro (dcaro) wrote :

Found a bug on the vte python bindings... I opened a bug:
https://bugzilla.gnome.org/show_bug.cgi?id=667044

Meanwhile, I've seen some 'strange' thing in the code, for example, the setup method of the view module, calls itself if it fails indefinetly.... (infinite recursion).

I've created a branch with another fix for the bug. feel free to review it and modify it if needed.

David

David Caro (dcaro) on 2012-01-08
Changed in clicompanion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.