CLI companion error 'MainWindow' object has no attribute 'cmd_notebook'

Bug #1043706 reported by paco
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
CLI Companion
Fix Released
High
Marek Bardoński

Bug Description

I am using Ubuntu 12.04 in the netbook. I used the terminal to get clicompanion from the PPA. It downloaded and is installed in my menu but, when I run it from the menu nothing happens. In the terminal gave an error message:

File "/usr/bin/clicompanion", line 66, in <module>
    run( options )
  File "/usr/lib/python2.7/dist-packages/clicompanionlib/view.py", line 575, in run
    config=config)
  File "/usr/lib/python2.7/dist-packages/clicompanionlib/view.py", line 225, in __init__
    self.init_config()
  File "/usr/lib/python2.7/dist-packages/clicompanionlib/view.py", line 397, in init_config
    self.cmd_notebook.set_netbook(True)
AttributeError: 'MainWindow' object has no attribute 'cmd_notebook'

Related branches

Changed in clicompanion:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Javier López (javier-lopez) wrote :

This is the content of the file $HOME/.clicompanion (generated manually):

dpkg -l @ package Find version of a package
df -h file system disk space usage
free -m show RAM usage

I've tested the development branch on ubuntu 12.04 with the same result

Changed in clicompanion:
assignee: nobody → Marek Bardoński (bdfhjk)
status: Confirmed → Fix Committed
Revision history for this message
Marek Bardoński (bdfhjk) wrote :

We need to remove 397 line of view.py to get it work on notebook.

Revision history for this message
David Caro (dcaro) wrote :

I've created a new branch, It should have solved the bug (the initialization function used the cmd:notebook property but it was not instantiated yet, changed the order).

I'll try to test it but if someone can do it also. please, go ahead :)

btw. Sorry for the 'absence' of the last months, I've moved to a new country, new job.... I'm trying to get back to normal yet xd

Revision history for this message
Javier López (javier-lopez) wrote :

Hi,

I've tested your branch on an up to date precise installation, I've followed these steps:

$ bzr branch lp:~dcaro/clicompanion/fix-1043706 && cd fix-*
$ python clicompanion
ERROR: locales dir not found.

Which is related with bug #1072253

So then I continued with:

$ wget https://launchpadlibrarian.net/121680964/fix.patch
$ patch -p1 -i fix.patch
patching file clicompanion
patching file clicompanionlib/view.py
$ python clicompanion //ask me to install python-vte
Using locale in source code folder
$ sudo apt-get install python-vte
$ python clicompanion
Using locale in source code folder
INFO: Reading config file at /home/chilicuil/.config/clicompanion/config.
Traceback (most recent call last):
  File "clicompanion", line 66, in <module>
    run( options )
  File "/home/chilicuil/fix-1043706/clicompanionlib/view.py", line 582, in run
    config=config)
  File "/home/chilicuil/fix-1043706/clicompanionlib/view.py", line 227, in __init__
    self.cmd_notebook = CommandsNotebook(config, self.pluginloader)
  File "/home/chilicuil/fix-1043706/clicompanionlib/view.py", line 95, in __init__
    self.draw_all()
  File "/home/chilicuil/fix-1043706/clicompanionlib/view.py", line 106, in draw_all
    self.config.get_plugin_conf('LocalCommandList'))
  File "/home/chilicuil/fix-1043706/plugins/LocalCommandList.py", line 76, in __init__
    self.config.get('default', 'cheatsheet'))
  File "/home/chilicuil/fix-1043706/plugins/LocalCommandList.py", line 476, in __init__
    self.load()
  File "/home/chilicuil/fix-1043706/plugins/LocalCommandList.py", line 488, in load
    open(self.ceatsheet, 'w').close()
AttributeError: Cheatsheet instance has no attribute 'ceatsheet'

$ python --version
Python 2.7.3

$ cat ~/.config/clicompanion/config
[profile::default]
update_login_records = True
colorb = #000000
encoding = UTF-8
antialias = True
scrollb = 500
bold_text = False
use_system_colors = False
use_system_font = False
font = Monospace 10
sel_word = -A-Za-z0-9,./?%&#:_
colorf = #FFFFFF
color_scheme = Custom

[LocalCommandList::default]
cheatsheet = /home/chilicuil/.clicompanion2

[general::default]
debug = False
plugins = LocalCommandList, CommandLineFU, StandardURLs

[keybindings]
previous_tab = unused
toggle_maximize = F11
edit_command = unused
cancel_command = ctrl+C
next_tab = unused
close_tab = unused
move_tab_right = unused
toggle_hide_ui = F9
add_command = F5
add_tab = F7
remove_command = F6
move_tab_left = unused
copy = shift+ctrl+C
paste = shift+ctrl+V
toggle_fullscreen = F12
run_command = F4

So.., it doesn't work here, greetings.

Revision history for this message
David Caro (dcaro) wrote :

Thanks a lot Javier!

it seems like a typo... I'll fix it and test it before uploading it again.

Revision history for this message
David Caro (dcaro) wrote :

I've tested it with a low resolution vm, can you test it also Javier?

Thanks!

Revision history for this message
Javier López (javier-lopez) wrote :

Yep, it works here too David, awesome! =)

$ cd fix-*
$ bzr pull
$ python ./clicompanion
Using locale in source code folder
INFO: Reading config file at /home/chilicuil/.config/clicompanion/config.

And the app shows up!

Revision history for this message
Javier López (javier-lopez) wrote :

I think you may close also bug #1072253

Revision history for this message
Javier López (javier-lopez) wrote :

after incorporating https://launchpadlibrarian.net/121680964/fix.patch .., greetings.

Revision history for this message
Duane Hinnen (duanedesign) wrote :

typo in LocalCommandList.py fixed. Thank you for the bug report.

Changed in clicompanion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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