wicd-1.7.2.4 is incompatible with urwid-1.1.0

Reported by Tomka-w on 2012-11-06
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
wicd
High
David Paleino
Arch Linux
New
Undecided
Unassigned
wicd (Debian)
Fix Released
Unknown
wicd (Gentoo Linux)
Fix Released
Wishlist

Bug Description

When trying to use wicd-curses with the latest stable version of urwid it fails as follows:

$ wicd-curses

Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1063, in <module>
    main()
  File "/usr/share/wicd/curses/wicd-curses.py", line 995, in main
    ui.run_wrapper(run)
  File "/usr/lib64/python2.7/site-packages/urwid/raw_display.py", line 242, in run_wrapper
    return fn()
  File "/usr/share/wicd/curses/wicd-curses.py", line 88, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1003, in run
    app = appGUI()
  File "/usr/share/wicd/curses/wicd-curses.py", line 548, in __init__
    self.wiredCB = urwid.Filler(WiredComboBox(wiredL))
  File "/usr/share/wicd/curses/wicd-curses.py", line 378, in __init__
    self.__super.__init__(use_enter=False)
  File "/usr/share/wicd/curses/curses_misc.py", line 352, in __init__
    self.focus = focus
AttributeError: can't set attribute

This is on Gentoo Linux and here is our bug report: https://bugs.gentoo.org/show_bug.cgi?id=441966

Related branches

Download full text (6.0 KiB)

After an update to dev-python/urwid-1.1.0-r1000, net-misc/wicd-1.7.2.4-r1 (with ncurses USE flag) is unable to start due to an AttributeError exception on focus.

Reproducible: Always

Steps to Reproduce:
1. emerge net-misc/wicd-1.7.2.4-r1 (with ncurses USE flag)
2. emerge dev-python/urwid-1.1.0-r1000
3. start dbus and wicd daemons
4. run wicd-curses
Actual Results:

Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1063, in <module>
    main()
  File "/usr/share/wicd/curses/wicd-curses.py", line 995, in main
    ui.run_wrapper(run)
  File "/usr/lib64/python2.7/site-packages/urwid/raw_display.py", line 242, in run_wrapper
    return fn()
  File "/usr/share/wicd/curses/wicd-curses.py", line 88, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1003, in run
    app = appGUI()
  File "/usr/share/wicd/curses/wicd-curses.py", line 548, in __init__
    self.wiredCB = urwid.Filler(WiredComboBox(wiredL))
  File "/usr/share/wicd/curses/wicd-curses.py", line 378, in __init__
    self.__super.__init__(use_enter=False)
  File "/usr/share/wicd/curses/curses_misc.py", line 352, in __init__
    self.focus = focus
AttributeError: can't set attribute

Expected Results:
A ncurses window, allowing the configuration of network connections.

Portage 2.3.4-r9 (funtoo/1.0/linux-gnu/arch/x86-64bit, gcc-4.6.3, glibc-2.15-r3, 3.6.0-rc3-funtoo x86_64)
=================================================================
System uname: Linux-3.6.0-rc3-funtoo-x86_64-Intel-R-_Core-TM-_i5-2430M_CPU_@_2.40GHz-with-gentoo-2.2.0
Timestamp of tree: Mon, 05 Nov 2012 18:45:01 +0000
app-shells/bash: 4.2_p37
dev-java/java-config: 2.1.12-r1000
dev-lang/python: 2.7.3-r1000, 3.2.3-r1000
dev-util/cmake: 2.8.9-r1
dev-util/pkgconfig: 0.27.1
sys-apps/baselayout: 2.2.0-r3
sys-apps/openrc: 0.10.2-r6
sys-apps/sandbox: 2.6
sys-devel/autoconf: 2.13, 2.69
sys-devel/automake: 1.9.6-r3, 1.11.6, 1.12.1
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.6.3
sys-devel/gcc-config: 1.5-r1
sys-devel/libtool: 2.4.2
sys-devel/make: 3.82-r4
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc: 2.15-r3
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE AdobeFlash-10.3 IBM-J1.5 IBM-J1.6 public-domain MPEG-4 fairuse free-noncomm freedist dropbox unrar CCPL-Attribution-NoDerivs-3.0 unRAR NEWLIB LIBGLOSS XAnim aquafont PUEL MSttfEULA Oracle-BCLA-JavaSE ISOC-rfc"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=corei7 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fakeroot fixlafil...

Read more...

Where did you get dev-python/urwid-1.1.0-r1000 and which extra patches does it contain? Does it work with in-tree urwid?

(In reply to comment #1)
> Where did you get dev-python/urwid-1.1.0-r1000 and which extra patches does
> it contain? Does it work with in-tree urwid?

I use funtoo's git tree. I honestly thought it was just a straight pull off the Gentoo rsync servers. I will fully and readily admit, I am wrong on that one. The ebuild doesn't seem to include any patches (and pulls from excess.org/urwid for the tar ball)

This being the case, I also grabbed the Gentoo ebuild, and it pulls from the same source. (I can only assume then it's the same issue for both, deper29 and SlashBeast on the forums both stated it broke their wicds and I assume they use the gentoo rsync tree.)

I see, the -r1000 was a red herring. Just the plain release of urwid-1.1.0 breaks wicd. This has happened before, urwid changes the interface on every version. I reported it on the wicd launchpad and you can follow the bug here:

https://bugs.launchpad.net/wicd/+bug/1075399

(In reply to comment #2)
> I use funtoo's git tree. I honestly thought it was just a straight pull off
> the Gentoo rsync servers. I will fully and readily admit, I am wrong on that
> one. The ebuild doesn't seem to include any patches (and pulls from
> excess.org/urwid for the tar ball)
>
> This being the case, I also grabbed the Gentoo ebuild, and it pulls from the
> same source. (I can only assume then it's the same issue for both, deper29
> and SlashBeast on the forums both stated it broke their wicds and I assume
> they use the gentoo rsync tree.)

Funtoo pulls in the progress-overlay for a lot of its python support which is maintained by Arfrever and uses his own 4-python EAPI so the differences between that and Gentoo can often be substantial.

(In reply to comment #4)
> (In reply to comment #2)
> > I use funtoo's git tree. I honestly thought it was just a straight pull off
> > the Gentoo rsync servers. I will fully and readily admit, I am wrong on that
> > one. The ebuild doesn't seem to include any patches (and pulls from
> > excess.org/urwid for the tar ball)
> >
> > This being the case, I also grabbed the Gentoo ebuild, and it pulls from the
> > same source. (I can only assume then it's the same issue for both, deper29
> > and SlashBeast on the forums both stated it broke their wicds and I assume
> > they use the gentoo rsync tree.)
>
> Funtoo pulls in the progress-overlay for a lot of its python support which
> is maintained by Arfrever and uses his own 4-python EAPI so the differences
> between that and Gentoo can often be substantial.

I tried, it also fails with Gentoo's urwid-1.1.0.

David Paleino (dpaleino) on 2012-11-15
Changed in wicd:
assignee: nobody → David Paleino (dpaleino)
importance: Undecided → High
status: New → Triaged
milestone: none → 1.7.3
David Paleino (dpaleino) wrote :

Hello,

I committed a fix in current bzr.

  http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/831

However, it would be nice if you could test it. I don't have urwid 1.1.0 (yet), so I based my patch only on current urwid's documentation/changelog.

Thanks for the report,
David

Changed in wicd:
status: Triaged → Fix Committed
dirt bag (crapuser) wrote :

i tried installing this and it didnt seem to install too well..

[root@badman experimental]# python setup.py install
failed to find revision number:
No module named vcsinfo
running install
Using init file ('/etc/rc.d/init.d/', 'init/redhat/wicd')
Using pid path wicd.pid
Language support for cs da de en en_GB es et fr fr_CA gl he hu it ja nl pl pt pt_BR ru sk sv uk zh_CN zh_TW
running build
running build_py
running compile_translations
Disabled ar_EG (67.7165354331% < 80.0%).
Disabled ast (44.8818897638% < 80.0%).
Disabled be (53.1496062992% < 80.0%).
Disabled bg (69.6850393701% < 80.0%).
Disabled ca (69.6850393701% < 80.0%).
sh: pybabel: command not found
Disabled cy (1.96850393701% < 80.0%).
sh: pybabel: command not found
sh: pybabel: command not found
Disabled el (78.3464566929% < 80.0%).
sh: pybabel: command not found
Disabled en_CA (0.0% < 80.0%).
sh: pybabel: command not found
Disabled eo (68.8976377953% < 80.0%).
sh: pybabel: command not found
Disabled es_AR (66.1417322835% < 80.0%).
Disabled es_CL (31.4960629921% < 80.0%).
Disabled es_CO (1.1811023622% < 80.0%).
Disabled es_GT (33.4645669291% < 80.0%).
Disabled es_MX (70.8661417323% < 80.0%).
Disabled es_NI (2.75590551181% < 80.0%).
Disabled es_VE (70.8661417323% < 80.0%).
sh: pybabel: command not found
Disabled eu (31.4960629921% < 80.0%).
Disabled fa (7.48031496063% < 80.0%).
Disabled fi (77.1653543307% < 80.0%).
sh: pybabel: command not found
sh: pybabel: command not found
sh: pybabel: command not found
sh: pybabel: command not found
Disabled hr (64.1732283465% < 80.0%).
sh: pybabel: command not found
Disabled id (14.1732283465% < 80.0%).
sh: pybabel: command not found
sh: pybabel: command not found
Disabled ka (44.8818897638% < 80.0%).
Disabled kk (70.8661417323% < 80.0%).
Disabled ko (70.8661417323% < 80.0%).
Disabled lt (70.8661417323% < 80.0%).
Disabled lv (31.4960629921% < 80.0%).
Disabled ml (5.11811023622% < 80.0%).
Disabled nb (12.9921259843% < 80.0%).
sh: pybabel: command not found
Disabled nn (25.9842519685% < 80.0%).
sh: pybabel: command not found
sh: pybabel: command not found
sh: pybabel: command not found
Disabled ro (71.2598425197% < 80.0%).
sh: pybabel: command not found
sh: pybabel: command not found
Disabled sl (60.6299212598% < 80.0%).
Disabled sr (67.3228346457% < 80.0%).
sh: pybabel: command not found
Disabled te (7.87401574803% < 80.0%).
Disabled tr (75.5905511811% < 80.0%).
sh: pybabel: command not found
Disabled vi (15.3543307087% < 80.0%).
sh: pybabel: command not found
Disabled zh_HK (22.8346456693% < 80.0%).
sh: pybabel: command not found
running install_lib
running install_data
error: can't copy 'translations/cs/LC_MESSAGES/wicd.mo': doesn't exist or not a regular file
[root@badman experimental]#

-db

David Paleino (dpaleino) wrote :

You need to install pybabel, which is a requirement since 1.7.1.

Otherwise, if you don't care about translations, just pass --no-install-i18n to setup.py.

Tomka-w (tomka-w) wrote :

There seem to be more problems. I'm getting this now with the patch applied.

$ wicd-curses

Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1063, in <module>
    main()
  File "/usr/share/wicd/curses/wicd-curses.py", line 995, in main
    ui.run_wrapper(run)
  File "/usr/lib64/python2.7/site-packages/urwid/raw_display.py", line 242, in run_wrapper
    return fn()
  File "/usr/share/wicd/curses/wicd-curses.py", line 88, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1003, in run
    app = appGUI()
  File "/usr/share/wicd/curses/wicd-curses.py", line 548, in __init__
    self.wiredCB = urwid.Filler(WiredComboBox(wiredL))
  File "/usr/share/wicd/curses/wicd-curses.py", line 378, in __init__
    self.__super.__init__(use_enter=False)
  File "/usr/share/wicd/curses/curses_misc.py", line 355, in __init__
    self.focus_position = focus
  File "/usr/lib64/python2.7/site-packages/urwid/widget.py", line 573, in _not_a_container
    "No focus_position, %r is not a container widget" % self)
IndexError: No focus_position, <WiredComboBox selectable box/flow widget> is not a container widget

David Paleino (dpaleino) wrote :

Thanks for the feedback.

I guess I'll install urwid 1.1.0, and debug it on my own -- seems like reading the docs isn't sufficient :)

Changed in wicd:
status: Fix Committed → In Progress
David Paleino (dpaleino) wrote :

I committed one more fix in rev. 835.

  http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/835

It would be nice if you could test it too :)

Kindly,
David

Changed in wicd:
status: In Progress → Fix Committed

(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #2)
> > > I use funtoo's git tree. I honestly thought it was just a straight pull off
> > > the Gentoo rsync servers. I will fully and readily admit, I am wrong on that
> > > one. The ebuild doesn't seem to include any patches (and pulls from
> > > excess.org/urwid for the tar ball)
> > >
> > > This being the case, I also grabbed the Gentoo ebuild, and it pulls from the
> > > same source. (I can only assume then it's the same issue for both, deper29
> > > and SlashBeast on the forums both stated it broke their wicds and I assume
> > > they use the gentoo rsync tree.)
> >
> > Funtoo pulls in the progress-overlay for a lot of its python support which
> > is maintained by Arfrever and uses his own 4-python EAPI so the differences
> > between that and Gentoo can often be substantial.
>
> I tried, it also fails with Gentoo's urwid-1.1.0.

Should be fixed in -r2. Please test.

Tomka-w (tomka-w) wrote :

Looks good. Gentoo ships the patches now, let's see if somebody complains.
Thanks.

dirt bag (tempuser-n) wrote :

i compiled that wicd_experimental-r835.tgz

and when i run it, i get

[jason@zim experimental]$ /var/tmp/wicd/usr/bin/wicd-curses

EXCEPTION! Please report this to the maintainer and file a bug report with the backtrace below:
Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1047, in <module>
    main()
  File "/usr/share/wicd/curses/wicd-curses.py", line 982, in main
    ui.run_wrapper(run)
  File "/usr/lib/python2.7/site-packages/urwid/raw_display.py", line 241, in run_wrapper
    return fn()
  File "/usr/share/wicd/curses/wicd-curses.py", line 89, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 990, in run
    app = appGUI()
  File "/usr/share/wicd/curses/wicd-curses.py", line 535, in __init__
    self.wiredCB = urwid.Filler(WiredComboBox(wiredL))
  File "/usr/share/wicd/curses/wicd-curses.py", line 365, in __init__
    self.__super.__init__(use_enter=False)
  File "/usr/share/wicd/curses/curses_misc.py", line 349, in __init__
    self.focus = focus
AttributeError: can't set attribute
[jason@zim experimental]$

[root@zim wicd]# rpm -qa | grep urwid
python-urwid-1.1.0-2.fc16.i686

-db

On Mon, 19 Nov 2012 19:58:41 -0000, dirt bag wrote:

> i compiled that wicd_experimental-r835.tgz
>
> and when i run it, i get
>
> [..]

Could you please run:

  $ python -c 'import urwid; print urwid.VERSION'

And report the output here?

Thanks,
David

--
 . ''`. Debian developer | http://wiki.debian.org/DavidPaleino
 : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
   `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

dirt bag (crapuser) wrote :

[jason@zim ~]$ python -c 'import urwid; print urwid.VERSION'
(1, 1, 0)
[jason@zim ~]$

David Paleino (dpaleino) wrote :

On Mon, 19 Nov 2012 19:58:41 -0000, dirt bag wrote:

> EXCEPTION! Please report this to the maintainer and file a bug report with
> the backtrace below: Traceback (most recent call last):
> File "/usr/share/wicd/curses/wicd-curses.py", line 1047, in <module>
> main()
> File "/usr/share/wicd/curses/wicd-curses.py", line 982, in main
> ui.run_wrapper(run)
> File "/usr/lib/python2.7/site-packages/urwid/raw_display.py", line 241, in
> run_wrapper return fn()
> File "/usr/share/wicd/curses/wicd-curses.py", line 89, in wrapper
> return func(*args, **kargs)
> File "/usr/share/wicd/curses/wicd-curses.py", line 990, in run
> app = appGUI()
> File "/usr/share/wicd/curses/wicd-curses.py", line 535, in __init__
> self.wiredCB = urwid.Filler(WiredComboBox(wiredL))
> File "/usr/share/wicd/curses/wicd-curses.py", line 365, in __init__
> self.__super.__init__(use_enter=False)
> File "/usr/share/wicd/curses/curses_misc.py", line 349, in __init__
> self.focus = focus
> AttributeError: can't set attribute
> [jason@zim experimental]$

Aha, obvious.

Sorry for not noticing it before: you're running wicd from /var/tmp/wicd, but
your PYTHONPATH isn't set accordingly. As you can see in the traceback, it's
calling the .py files installed system-wide. You're effectively using the old
wicd, not the new one.

Please install it system-wide, or set PYTHONPATH accordingly.

Kindly,
David

--
 . ''`. Debian developer | http://wiki.debian.org/DavidPaleino
 : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
   `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

dirt bag (crapuser) wrote :

aha ok, sorry, I was trying to not overwrite my original system install in case it didnt work. what shouly PYTHONPATH be set to?

-db

David Paleino (dpaleino) wrote :

On Tue, 20 Nov 2012 19:11:52 -0000, dirt bag wrote:

> aha ok, sorry, I was trying to not overwrite my original system install
> in case it didnt work. what shouly PYTHONPATH be set to?

You should have a directory like /var/tmp/wicd/usr/lib/python2.*/ populated
after the install.
Something like that should work (I can't remember whether you should include
site-/dist-packages in that path or not, sorry).

David

--
 . ''`. Debian developer | http://wiki.debian.org/DavidPaleino
 : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal
   `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174

Hijacking this bug for stabilization. Arches, please test and stable. The new version has only one patch more than the old stable and this fixes compatibility with all known versions of urwid.

amd64 stable

@Thomas:

we need wicd stable for ppc/ppc64 for bug 450678, is fine for you?if yes, cc arches and block 450678

(In reply to comment #9)
> @Thomas:
>
> we need wicd stable for ppc/ppc64 for bug 450678, is fine for you?if yes, cc
> arches and block 450678

I don't see anything against new stable versions for those arches, but I also don't use them. Please test and mark stable if possible.

ppc stable

ppc64 stable

x86 stable

isis (isis) wrote :

With Python 2.7.3 on a (mostly) Debian sid system, I get the following:

$ wicd-curses --version
wicd-curses-uimod (using wicd 1.7.2.4)
$ python -c "import urwid; print urwid.VERSION"
(1, 1, 1)

$ wicd-curses

Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1063, in <module>
    main()
  File "/usr/share/wicd/curses/wicd-curses.py", line 995, in main
    ui.run_wrapper(run)
  File "/usr/local/lib/python2.7/dist-packages/urwid/raw_display.py", line 242, in run_wrapper
    return fn()
  File "/usr/share/wicd/curses/wicd-curses.py", line 88, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1003, in run
    app = appGUI()
  File "/usr/share/wicd/curses/wicd-curses.py", line 548, in __init__
    self.wiredCB = urwid.Filler(WiredComboBox(wiredL))
  File "/usr/share/wicd/curses/wicd-curses.py", line 378, in __init__
    self.__super.__init__(use_enter=False)
  File "/usr/share/wicd/curses/curses_misc.py", line 352, in __init__
    self.focus = focus
AttributeError: can't set attribute

This is due to curses_misc.ComboBox.focus being a property descriptor, and while the property setter set_focus() is defined in curses_misc.ComboBox, the getter and deleter methods are not, and @property methods are not inherited from their parent classes.

The attached patch fixes the problem for my system.

Tomka-w (tomka-w) wrote :

Since somebody added the Gentoo Bug watch, let me mention that in Gentoo
we have no problems with this anymore. The patch from comment #6 fixes
the problem.

On 07/02/2013 04:59 PM, Axel Beckert wrote:
> ** Bug watch added: Debian Bug tracker #709120
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709120
>
> ** Also affects: wicd (Debian) via
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709120
> Importance: Unknown
> Status: Unknown
>
> ** Bug watch added: Gentoo Bugzilla #441966
> https://bugs.gentoo.org/show_bug.cgi?id=441966
>
> ** Also affects: wicd (Gentoo Linux) via
> https://bugs.gentoo.org/show_bug.cgi?id=441966
> Importance: Unknown
> Status: Unknown
>

--
Thomas Kahle

Changed in wicd (Debian):
status: Unknown → Fix Released
Changed in wicd (Gentoo Linux):
importance: Unknown → Wishlist
status: Unknown → Fix Released

Hi,

Tomka-w wrote:
> Since somebody added the Gentoo Bug watch, let me mention that in Gentoo
> we have no problems with this anymore. The patch from comment #6 fixes
> the problem.

I added it for completenes since Launchpad didn't do that
automatically as it usually does with e.g. Debian bugs when they're
mentioned in some comment.

I also added the according Debian bug despite I'm the one who fixed it
in Debian.

  Regards, Axel
--
 ,''`. | Axel Beckert <email address hidden>, http://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
  `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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