config parser crashes when changing accounts

Bug #717349 reported by wolfer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
avernus
Fix Released
Critical
wolfer

Bug Description

to reproduce:
a) select an account... everything is ok
b) select another account.... config crashes, account is not shown

Traceback (most recent call last):
  File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/gui/left_pane.py", line 157, in on_cursor_changed
    pubsub.publish('maintree.select', obj)
  File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/pubsub.py", line 19, in publish
    subscriber(*args, **kwargs)
  File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/gui/mainwindow.py", line 198, in on_maintree_select
    self.notebook.append_page(tab(item), gtk.Label(name))
  File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/gui/account_transactions_tab.py", line 97, in __init__
    pre = self.config.get_option('account hpaned position', 'Gui')
  File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/config.py", line 75, in get_option
    return self.parser.get(section, name)
  File "/usr/lib/python2.6/ConfigParser.py", line 546, in get
    return self._interpolate(section, option, value, d)
  File "/usr/lib/python2.6/ConfigParser.py", line 586, in _interpolate
    if "%(" in value:
TypeError: argument of type 'int' is not iterable

Revision history for this message
simpsus (bastian-kennel) wrote : Re: [Bug 717349] [NEW] config parser crashes when changing accounts

strangely enough it crashes when trying to parse the hpaned position....
maybe I overlooked a singleton thing, but am not sure
···········································
Bastian Kennel

<email address hidden>
···········································

On Fri, Feb 11, 2011 at 8:03 PM, wolfer <email address hidden> wrote:

> Public bug reported:
>
> to reproduce:
> a) select an account... everything is ok
> b) select another account.... config crashes, account is not shown
>
>
> Traceback (most recent call last):
> File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/gui/left_pane.py",
> line 157, in on_cursor_changed
> pubsub.publish('maintree.select', obj)
> File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/pubsub.py", line
> 19, in publish
> subscriber(*args, **kwargs)
> File
> "/home/wolfer/Dropbox/code/avernus/avernus/avernus/gui/mainwindow.py", line
> 198, in on_maintree_select
> self.notebook.append_page(tab(item), gtk.Label(name))
> File
> "/home/wolfer/Dropbox/code/avernus/avernus/avernus/gui/account_transactions_tab.py",
> line 97, in __init__
> pre = self.config.get_option('account hpaned position', 'Gui')
> File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/config.py", line
> 75, in get_option
> return self.parser.get(section, name)
> File "/usr/lib/python2.6/ConfigParser.py", line 546, in get
> return self._interpolate(section, option, value, d)
> File "/usr/lib/python2.6/ConfigParser.py", line 586, in _interpolate
> if "%(" in value:
> TypeError: argument of type 'int' is not iterable
>
> ** Affects: avernus
> Importance: Critical
> Status: Confirmed
>
> --
> You received this bug notification because you are a member of avernus-
> heros, which is subscribed to avernus.
> https://bugs.launchpad.net/bugs/717349
>
> Title:
> config parser crashes when changing accounts
>
> Status in avernus:
> Confirmed
>
> Bug description:
> to reproduce:
> a) select an account... everything is ok
> b) select another account.... config crashes, account is not shown
>
>
> Traceback (most recent call last):
> File
> "/home/wolfer/Dropbox/code/avernus/avernus/avernus/gui/left_pane.py", line
> 157, in on_cursor_changed
> pubsub.publish('maintree.select', obj)
> File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/pubsub.py", line
> 19, in publish
> subscriber(*args, **kwargs)
> File
> "/home/wolfer/Dropbox/code/avernus/avernus/avernus/gui/mainwindow.py", line
> 198, in on_maintree_select
> self.notebook.append_page(tab(item), gtk.Label(name))
> File
> "/home/wolfer/Dropbox/code/avernus/avernus/avernus/gui/account_transactions_tab.py",
> line 97, in __init__
> pre = self.config.get_option('account hpaned position', 'Gui')
> File "/home/wolfer/Dropbox/code/avernus/avernus/avernus/config.py", line
> 75, in get_option
> return self.parser.get(section, name)
> File "/usr/lib/python2.6/ConfigParser.py", line 546, in get
> return self._interpolate(section, option, value, d)
> File "/usr/lib/python2.6/ConfigParser.py", line 586, in _interpolate
> if "%(" in value:
> TypeError: argument of type 'int' is not iterable
>
>
>

Revision history for this message
simpsus (bastian-kennel) wrote :

Making the singleton back to a non-singleton resolves THIS issue, so it has something to do with the singleton implementation.
The id's ob the two config objects of the account tabs are the same, so its not that. A "write" before reading the option does not resolve the issue, so in my eyes it is nothing related to a dirty read or something. The argument types passed to the get function are valid. I do not know which "int" the error message refers to. The call works fine when clicking on the first account

wolfer (wolfer7)
Changed in avernus:
assignee: nobody → wolfer (wolfer7)
status: Confirmed → Fix Committed
wolfer (wolfer7)
Changed in avernus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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