You are not logged in.
Hello all,
I have a laptop with a Broadcom 4312 wireless card in it. I have followed the wiki and installed the broadcom-wl drivers. I am trying to use wicd to setup my wireless.
When I open wicd-gtk, I get a list of wireless networks, one of which is mine. I try to connect to it, and it says I need a password and it opens up the Settings page for that network. Then I type in my password, but when I hit OK or Cancel, nothing happens. If I start wicd from a terminal, I see this as output:
$ wicd-gtk
** (process:1063): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'
** (process:1063): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'
** (process:1063): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags'
Importing pynotify failed, notifications disabled.
Has notifications support False
Loading...
Connecting to daemon...
Connected.
displaytray True
Done loading.
refreshing...
ESSID : <hidden>
ESSID : a_network
ESSID : another_network
setting encryption info...
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
encrypt_methods[self.combo_encryption.get_active()]['type'])
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__
**keywords)
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
return s.translate(None, table)
TypeError: translate() takes exactly one argument (2 given)
I tried using the ncurses client but I get the same error. Also I tried editing /usr/lib/python2.7/site-packages/wicd/misc.py on line 433 and changing s.translate(None, table) to just s.translate(table), but I get the exact same error (2 arguments instead of 1, even though in the error message it shows the line as s.translate(table) which only is one argument).
Does anyone know how to fix this error? It's stopping me from using wireless, since I can't get wpa_supplicant working either.
Last edited by kens (2012-05-06 16:01:08)
Offline
I have the same Problem since the update.
Offline
same here, kinda looks like a nasty little bug
Offline
BC 4312 sucks, got it too and always had nothing but trouble. Using opensource driver though - you may give it a try, although this look more like a Wicd bug.
Anyway, how come you cannot get wpa_supplicant working? Maybe it's related...
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
might very well be (although I doubt it), since afaik wicd uses wpa_supplicant. This most definitely doesn't look like a driver issue though, it's just like kens wrote: when you click ok to save the password, nothing happens
edit: and my wlan connection worked a few days ago when I last needed it
edit2:
ok, I now did what I should have done first: I read the bloody error...
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
return s.translate(None, table)
TypeError: translate() takes exactly one argument (2 given)
sanitize_config is called just before saving the config I guess, and translate is simply called with 2 arguments instead of 1. Sounds like a simple coding error, good chance to have a look at the code I guess .
edit3:
ok, I'm too tired to fix this, but they fiddled around with this function, old version:
def sanitize_config(s):
""" Sanitize property names to be used in config-files. """
s = s.strip()
s = s.replace('=', '')
s = s.replace(' ', '')
s = s.replace('\n', '')
return s
new version:
def sanitize_config(s):
""" Sanitize property names to be used in config-files. """
allowed = string.ascii_letters + '_' + string.digits
table = string.maketrans(allowed, ' ' * len(allowed))
return s.translate(None, table)
just replacing the function won't work, the upper layer obviously changed, too. I'll try a rollback and see what happens.
edit4:
rollback produces the same error I got when I switched the functions... since I'm almost falling off the chair I'll call it a day...
here is the rollback error if anyone cares:
setting encryption info...
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
encrypt_methods[self.combo_encryption.get_active()]['type'])
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__
**keywords)
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
if misc.sanitize_config(prop).endswith('script'):
File "/usr/lib/python2.7/site-packages/wicd/misc.py", line 433, in sanitize_config
s = s.replace('\n', '')
TypeError: character mapping must return integer, None or unicode
Last edited by frette (2012-05-05 01:34:50)
Offline
ok, Im posting via wlan
The problem was actually not the changed function I mentioned above, but how it was called.
It's called in /usr/share/wicd/daemon/wicd-daemon.py lines 1067 and 1411 (and 1268, but I didn't change that) with prop as argument. The error we see is a unicode error. So I fiddled around a bit and a simple string cast does the trick.
so just change the aforementioned lines from
prop = misc.sanitize_config(prop)
to
prop = misc.sanitize_config(str(prop))
and everything should be fine
obviously I don't guarantee anything and you are doing this at your own risk.
If you didn't understand a word of what I said, you're probably better off waiting for a patch.
Have a nice day (and I'm finally going to bed now xD)
edit: don't forget to restart the wicd daemon
Last edited by frette (2012-05-05 02:41:46)
Offline
frette, I tried using the old function and it worked just fine for me. What did it do for you? Keep in mind you'll have to restart wicd for change you make to take effect.
The problem here is they're assuming the string is an ascii string, when it's actually a unicode string. Here's a fix that works for the newer code;
def sanitize_config(s):
""" Sanitize property names to be used in config-files. """
allowed = string.ascii_letters + '_' + string.digits
table = string.maketrans(allowed, ' ' * len(allowed))
return str(s).translate(None, table)
The only change is on the last line. Make no mistake, that's a bad solution for handling unicode.
The problem is that DBus is sending a unicode string through to wicd, which wicd is not expecting. I tried the other route of modifying sanitize_config to better handle unicode strings, but that had... side effects. Like storing the reprs of lists in my /etc/wicd/wireless-settings.conf.
The more correct fix would be to update wicd to use unicode strings, which I imagine would be a rather large undertaking. Today my first encounter with wicd at all, let alone the code, so I couldn't say for sure how easy this change would be.
Edit: I hadn't refreshed before I posted this. Glad you found a fix in the end!
Last edited by Hiram (2012-05-05 03:18:36)
Offline
my fix is for the newer code too and it works fine for me
you simply do the string cast one step later, which results in fewer changes
Offline
I don't fully understand the fix, but you're my personal Jesus!
I've recently installed Arch and stumbled upon this thread after hours of racking my brain over why Wicd would not allow me to save any networks settings, making it completely useless. I was about ready to jump ship and install NM.
Last edited by snoxu (2012-05-05 03:31:29)
Offline
Yeah, they both work, which is the important thing
Offline
Yep, that fixed it. Thanks all, and good job.
If anyone needs it, here is the patch for extra/wicd 1.7.2.4-1 /usr/share/wicd/daemon/wicd-daemon.py:
1067c1067
< prop = misc.sanitize_config(prop)
---
> prop = misc.sanitize_config(str(prop))
1411c1411
< prop = misc.sanitize_config(prop)
---
> prop = misc.sanitize_config(str(prop))
Last edited by ewaller (2012-05-05 18:17:11)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
This was reported upstream already: https://bugs.launchpad.net/wicd/+bug/993912
Here is the Arch Linux bug: https://bugs.archlinux.org/task/29709
Hopefully they will release a bugfix release soon...
Offline
Hi everyone,
I was having the same problem. Frette, your solution fixed it for me, thank you!
ℕ
Offline
Thanks guys, the fix indeed worked. I now know that it was because I didn't restart the wicd daemon that it was giving me an irrelevant error when I edited the python file
It still can't connect to networks with hidden SSID's though for some reason, it always fails with 'bad password' in the console. I unhid the SSID of my router and it actually gets connected, but seconds later it drops the connection and goes back to "unconnected". That's an unrelated problem though, so I'll start a new thread or something if I can't get it working. Thank you all for the help, I had to apply this patch to my other 2 computers running Arch too
Offline
It would appear that today's update to 1.7.2.4-2 has fixed the problem
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Good to know, and a good chance to see how they actually chose to fix it
(I actually liked Hiram's fix more than my own tbh and am using his )
edit: and so did the wicd devs I just had a look at the code
Last edited by frette (2012-05-08 00:39:02)
Offline