[wicd-curses and wicd-gtk] crashes when trying to save network properties

Bug #993912 reported by ise on 2012-05-03
This bug affects 3 people
Affects Status Importance Assigned to Milestone
David Paleino
Arch Linux

Bug Description

wicd-curses crashes when trying to save network properties, no matter if you try it with wicd-curses or wicd-gtk

DBus failure! This is most likely caused by the wicd daemon stopping while wicd-curses is running. Please restart the daemon, and then restart wicd-curses.
Traceback (most recent call last):
File "/usr/share/wicd/curses/wicd-curses.py", line 921, in call_update_ui
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 932, in update_ui
File "/usr/share/wicd/curses/wicd-curses.py", line 913, in handle_keys
File "/usr/share/wicd/curses/netentry_curses.py", line 481, in save_settin
self.set_net_prop("enctype", "None")
File "/usr/share/wicd/curses/netentry_curses.py", line 448, in set_net_pro
wireless.SetWirelessProperty(self.networkid, option, value)
File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __ca
File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in cblocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceb(most recent call last):
File "/usr/lib/python2.7/site-packages/dbus/service.py", line 707, in _mes_cb
retval = candidate_method(self, *args, **keywords)
File "/usr/share/wicd/daemon/wicd-daemon.py", line 1067, in SetWirelessProy
prop = misc.sanitize_config(prop)
File "/usr/lib/python2.7/site-packages/wicd/misc.py", line 433, in sanitiznfig
return s.translate(None, table)
TypeError: translate() takes exactly one argument (2 given)

wicd version: latest (
Distro: Arch Linux
Arch Linux Bug report: https://bugs.archlinux.org/task/29709

Maybe a fix:

prop = misc.sanitize_config(prop)
prop = misc.sanitize_config(str(prop))

Related branches

Cyrille Pontvieux (jrd-enialis) wrote :

I had the same bug.
Here the patch I created/applied.

Feel free to review it and/or find a better way to implement this.

David Paleino (dpaleino) wrote :

No, please. The patch might work, but is conceptually wrong.

"Property" should NEVER be something different than a string.

In fact, I regularly use wicd-gtk, and it works fine. So this is probably a bug in wicd-curses.

Cyrille Pontvieux (jrd-enialis) wrote :

No this bug appear s on wicd-gtk too. I know few people having this bug. I could try to reproduce the bug and post the python stacktrace. Maybe something related to unicode as str function force conversion.
But the bug is definitely real.

David Paleino (dpaleino) wrote :

Ok, ACKed and patch made. I also found what the culprit was (and why it worked on my system). The patch is really similar to Cyrille's, but more general.


I'm marking it for 1.7.3 -- it would deserve a, but I'm quite fed up of doing minor 1.7.2 releases. So please wait a couple of days, so that I can fix more bugs for 1.7.3.


Changed in wicd:
importance: Undecided → High
status: New → In Progress
assignee: nobody → David Paleino (dpaleino)
milestone: none → 1.7.3
status: In Progress → Fix Committed
ise (daniel-isenmann) wrote :

The patch doesn't fix the problem here. Nearly the same error appears, here is the output:

Traceback (most recent call last):
  File "/usr/share/wicd/gtk/gui.py", line 666, in edit_advanced
    if self.run_settings_dialog(dialog, ttype, networkid, networkentry):
  File "/usr/share/wicd/gtk/gui.py", line 679, in run_settings_dialog
    if self.save_settings(nettype, networkid, networkentry):
  File "/usr/share/wicd/gtk/gui.py", line 644, in save_settings
    if not networkentry.save_wireless_settings(networkid):
  File "/usr/share/wicd/gtk/netentry.py", line 940, in save_wireless_settings
    return self.advanced_dialog.save_settings(networkid)
  File "/usr/share/wicd/gtk/netentry.py", line 591, in save_settings
  File "/usr/share/wicd/gtk/netentry.py", line 532, in set_net_prop
    wireless.SetWirelessProperty(self.networkID, option, value)
  File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
  File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/share/wicd/daemon/wicd-daemon.py", line 1067, in SetWirelessProperty
    prop = misc.sanitize_config(prop)
  File "/usr/lib/python2.7/site-packages/wicd/misc.py", line 433, in sanitize_config
TypeError: translate() takes exactly one argument (2 given)

Traceback (most recent call last):
  File "/usr/share/wicd/gtk/wicd-client.py", line 1066, in <module>
  File "/usr/share/wicd/gtk/wicd-client.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/share/wicd/gtk/wicd-client.py", line 1062, in main

ise (daniel-isenmann) wrote :

Forget my last comment, the fix is working!!

Thanks for the commit!

Stuart Longland (redhatter) wrote :


I just ran into this bug whilst setting up wicd on Yocto Linux. It seems in the neighbourhood we have an access point that has all kinds of rubbish characters in its SSID, and this causes wicd to crash with the above issue, in spite of the patches.

I fixed it with the following patch. The purpose here, is to filter out all the "garbage" characters in the string that would otherwise yield a unicode object, *then* perform the translate.

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

Other bug subscribers