wicd-curses crashes with "AttributeError in keypress(): 'Text' object has no attribute 'keypress'" if wired connection is shown and the first keypress happens only after several seconds

Bug #1434238 reported by deeenes on 2015-03-19
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
wicd
Undecided
Unassigned
wicd (Debian)
Fix Released
Unknown

Bug Description

wicd version: 1.7.3
python version: 2.7.9
platform: Linux 3.18.6 x86_64, Arch Linux

After pressing "arrow down" key, browsing the list of wireless networks:

Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1146, in call_update_ui
    self.update_ui(True)
  File "/usr/share/wicd/curses/wicd-curses.py", line 97, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1159, in update_ui
    self.handle_keys(input_data)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1128, in handle_keys
    k = self.frame.keypress(self.size, k)
  File "/usr/lib/python2.7/site-packages/urwid/container.py", line 1128, in keypress
    return self.body.keypress( (maxcol, remaining), key )
  File "/usr/lib/python2.7/site-packages/urwid/container.py", line 1587, in keypress
    key = self.focus.keypress(tsize, key)
  File "/usr/lib/python2.7/site-packages/urwid/decoration.py", line 836, in keypress
    return self._original_widget.keypress((maxcol,), key)
  File "/usr/share/wicd/curses/wicd-curses.py", line 474, in keypress
    key = ComboBox.keypress(self, size, key)
  File "/usr/share/wicd/curses/curses_misc.py", line 497, in keypress
    return self._w.keypress(size, key)
  File "/usr/lib/python2.7/site-packages/urwid/container.py", line 2269, in keypress
    key = w.keypress((mc,) + size[1:], key)
AttributeError: 'Text' object has no attribute 'keypress'

Harel Amnon (harelamnon) wrote :

On my system it happens whenever I return to an open wicd-curses session after a while and press a key.
wicd-curses --version gives:
wicd-curses-uimod (using wicd 1.7.3)

Some system info: 3.17.8-gentoo-r1 #2 SMP Tue Feb 17 14:48:15 IST 2015 x86_64 Intel(R) Core(TM) i7-2620M CPU @ 2.70GHz GenuineIntel GNU/Linux

Raf (rafaqz) wrote :

I'm experiencing the same problem - it actually kills wicds interface with my wifi card and I have to physically reset it, which seems strange, and it's pretty much unusable.

wicd 1.7.3 (bzr-r933) , on arch linux

Console errors:

Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1146, in call_update_ui
    self.update_ui(True)
  File "/usr/share/wicd/curses/wicd-curses.py", line 97, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1159, in update_ui
    self.handle_keys(input_data)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1128, in handle_keys
    k = self.frame.keypress(self.size, k)
  File "/usr/lib/python2.7/site-packages/urwid/container.py", line 1128, in keypress
    return self.body.keypress( (maxcol, remaining), key )
  File "/usr/lib/python2.7/site-packages/urwid/container.py", line 1587, in keypress
    key = self.focus.keypress(tsize, key)
  File "/usr/lib/python2.7/site-packages/urwid/decoration.py", line 836, in keypress
    return self._original_widget.keypress((maxcol,), key)
  File "/usr/share/wicd/curses/wicd-curses.py", line 474, in keypress
    key = ComboBox.keypress(self, size, key)
  File "/usr/share/wicd/curses/curses_misc.py", line 497, in keypress
    return self._w.keypress(size, key)
  File "/usr/lib/python2.7/site-packages/urwid/container.py", line 2269, in keypress
    key = w.keypress((mc,) + size[1:], key)
AttributeError: 'Text' object has no attribute 'keypress'

Richard Narron (comet-berkeley) wrote :

wicd version: 1.7.4
python version: 2.7.11
platform: Linux 4.4.6- x86_64, Slackware Linux

The current version of Slackware had this bug until the urwid package was downgraded from urwid 1.3.0 to version 1.0.3
Now the bug is gone.

If your system is using uriwd-1.3.0 or above, then remove the patch, wicd-1.7.3-urwid-1.3.0.patch, from wicd and downgrade
urwid to 1.0.3.

Hi,

comet--berkeley wrote:
> The current version of Slackware had this bug until the urwid package was downgraded from urwid 1.3.0 to version 1.0.3
> Now the bug is gone.
>
> If your system is using uriwd-1.3.0 or above, then remove the patch, wicd-1.7.3-urwid-1.3.0.patch, from wicd and downgrade
> urwid to 1.0.3.

This is impossible in most other distributions -- at least in Ubuntu and
Debian this is definitely not an option.

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

summary: - wicd-curses crashes randomly on keypress
+ wicd-curses crashes randomly on keypress
deeenes (turei-denes) wrote :
Download full text (4.3 KiB)

In Arch Linux, the current version of python2-urwid is 1.3.1. Indeed,
with this version I don't get exactly the same crash, while with
downgrading to 1.1.1 (the oldest available), I get this error.
However, 2 other crashes still occure:

1: when I hit return in wicd-curses to connect to one network in the list:

ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line
230, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 97, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 850, in update_netlist
    self.wiredCB.get_body().set_list(wiredL)
  File "/usr/share/wicd/curses/wicd-curses.py", line 469, in set_list
    wired.ReadWiredNetworkProfile(self.get_selected_profile())
  File "/usr/share/wicd/curses/wicd-curses.py", line 535, in
get_selected_profile
    return self.theList[loc]
IndexError: list index out of range

2: and one when I hit right arrow to go to preferences:

Traceback (most recent call last):
  File "/usr/share/wicd/curses/wicd-curses.py", line 1146, in call_update_ui
    self.update_ui(True)
  File "/usr/share/wicd/curses/wicd-curses.py", line 97, in wrapper
    return func(*args, **kargs)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1159, in update_ui
    self.handle_keys(input_data)
  File "/usr/share/wicd/curses/wicd-curses.py", line 1037, in handle_keys
    self.diag = WirelessSettingsDialog(pos, self.frame)
  File "/usr/share/wicd/curses/netentry_curses.py", line 503, in __init__
    self.set_values()
  File "/usr/share/wicd/curses/netentry_curses.py", line 543, in set_values
    wireless.GetWirelessProperty(networkID, 'bitrate')

Best,

Denes

2016-03-28 15:59 GMT+01:00 comet--berkeley <email address hidden>:
> wicd version: 1.7.4
> python version: 2.7.11
> platform: Linux 4.4.6- x86_64, Slackware Linux
>
> The current version of Slackware had this bug until the urwid package was downgraded from urwid 1.3.0 to version 1.0.3
> Now the bug is gone.
>
> If your system is using uriwd-1.3.0 or above, then remove the patch, wicd-1.7.3-urwid-1.3.0.patch, from wicd and downgrade
> urwid to 1.0.3.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1434238
>
> Title:
> wicd-curses crashes randomly on keypress
>
> Status in wicd:
> New
>
> Bug description:
> wicd version: 1.7.3
> python version: 2.7.9
> platform: Linux 3.18.6 x86_64, Arch Linux
>
> After pressing "arrow down" key, browsing the list of wireless
> networks:
>
> Traceback (most recent call last):
> File "/usr/share/wicd/curses/wicd-curses.py", line 1146, in call_update_ui
> self.update_ui(True)
> File "/usr/share/wicd/curses/wicd-curses.py", line 97, in wrapper
> return func(*args, **kargs)
> File "/usr/share/wicd/curses/wicd-curses.py", line 1159, in update_ui
> self.handle_keys(input_data)
> File "/usr/share/wicd/curses/wicd-curses.py", line 1128, in handle_keys
> k = self.frame.keypress(self.size, k)
> Fil...

Read more...

Changed in wicd (Debian):
status: Unknown → New

Dear Denes,

For those latter two crashes (which are unrelated to this bug report) you can find working patches in at least Debian and Ubuntu (see https://anonscm.debian.org/cgit/collab-maint/wicd.git/tree/debian/patches) and AFAIK also in ArchLinux, Voidlinux and Slackware.

Please keep this bug report about crashes with the error message "AttributeError: 'Text' object has no attribute 'keypress'". Thanks!

Control: tag -1 + help
Control: retitle -1 wicd-curses: crashes with "AttributeError in keypress(): 'Text' object has no attribute 'keypress'" if wired connection is shown and the first keypress happens only after several seconds

Hi together,

<email address hidden> wrote:
> AttributeError: 'Text' object has no attribute 'keypress'

Valentin Heinz wrote:
> AttributeError: 'Text' object has no attribute 'keypress'

Christian Heinrich wrote:
> AttributeError: 'Text' object has no attribute 'keypress':A1
> Master    1

deenes wrote on Launchpad:
> AttributeError: 'Text' object has no attribute 'keypress'

I've just uploaded an updated wicd package to Debian Unstable which
fixes many outstanding issues in Debian and Ubuntu.

Unfortunately I haven't yet found a bug fix for this issue.

I though could at least trace it down so far that I can reliably
reproduce it and know what circumstance need to be present:

Requirements:

* The wired interface needs to be shown, i.e. either "Always show
  wired interface" is on or the wired interface has link.

How to reproduce reliably:

* Start wicd-curses and don't press any keys.
* Wait until "wired-default" is no more highlighted, i.e. no more
  displayed inverted.
* Press more or less any key. ("H" for help does not immediately
  crash, but first shows the help and crashes when you quit the help
  dialog.)

Probably the right way to tackle this is to find out what unhighlights
and hence unselects the wired-default connection (and instead selects
something which can't receive keypresses) and then make it stop doing
that.

But I've so far not yet found what unselects the wired connection in
the TUI. Any help (further debugging, patches, suggestions) is
appreciated here.

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

Axel Beckert (xtaran) on 2017-01-22
summary: - wicd-curses crashes randomly on keypress
+ wicd-curses crashes with "AttributeError in keypress(): 'Text' object
+ has no attribute 'keypress'" if wired connection is shown and the first
+ keypress happens only after several seconds
Changed in wicd (Debian):
status: New → Confirmed
Changed in wicd (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
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.