# wicd occur exception when connecting to AP

## linuxsir320

[I] net-misc/wicd

     Available versions:  1.6.2.2 1.7.0 {X +gtk ioctl libnotify ncurses nls +pm-utils}

     Installed versions:  1.7.0(12:35:12 AM 03/14/2010)(X gtk libnotify ncurses pm-utils -ioctl -nls)

     Homepage:            http://wicd.sourceforge.net/

     Description:         A lightweight wired and wireless network manager for Linux

```

2010/03/14 22:35:55 :: ---------------------------

2010/03/14 22:35:55 :: wicd initializing...

2010/03/14 22:35:55 :: ---------------------------

2010/03/14 22:35:55 :: wicd is version 1.7.0 552

2010/03/14 22:35:55 :: setting backend to external

2010/03/14 22:35:55 :: trying to load backend external

2010/03/14 22:35:55 :: successfully loaded backend external

2010/03/14 22:35:55 :: trying to load backend external

2010/03/14 22:35:55 :: successfully loaded backend external

2010/03/14 22:35:55 :: Automatically detected wireless interface wlan0

2010/03/14 22:35:55 :: setting wireless interface wlan0

2010/03/14 22:35:55 :: automatically detected wired interface eth0

2010/03/14 22:35:55 :: setting wired interface eth0

2010/03/14 22:35:55 :: setting wpa driver None

2010/03/14 22:35:55 :: setting use global dns to False

2010/03/14 22:35:55 :: setting global dns

2010/03/14 22:35:55 :: global dns servers are None None None

2010/03/14 22:35:55 :: domain is None

2010/03/14 22:35:55 :: search domain is None

2010/03/14 22:35:55 :: setting automatically reconnect when connection drops True

2010/03/14 22:35:55 :: Setting dhcp client to 0

2010/03/14 22:35:55 :: Wireless configuration file found...

2010/03/14 22:35:55 :: Wired configuration file found...

2010/03/14 22:35:55 :: chmoding configuration files 0600...

2010/03/14 22:35:55 :: chowning configuration files root:root...

2010/03/14 22:35:55 :: Using wireless interface...wlan0

2010/03/14 22:35:55 :: Using wired interface...eth0

2010/03/14 22:35:56 :: hidden

2010/03/14 22:36:01 :: Autoconnecting...

2010/03/14 22:36:01 :: No wired connection present, attempting to autoconnect to wireless network

2010/03/14 22:36:02 :: hidden

2010/03/14 22:36:02 :: Unable to autoconnect, you'll have to manually connect

2010/03/14 22:36:06 :: Autoconnecting...

2010/03/14 22:36:06 :: No wired connection present, attempting to autoconnect to wireless network

2010/03/14 22:36:06 :: hidden

2010/03/14 22:36:07 :: Unable to autoconnect, you'll have to manually connect

2010/03/14 22:36:11 :: Autoconnecting...

2010/03/14 22:36:11 :: No wired connection present, attempting to autoconnect to wireless network

2010/03/14 22:36:11 :: hidden

2010/03/14 22:36:12 :: Unable to autoconnect, you'll have to manually connect

2010/03/14 22:36:13 :: hidden

2010/03/14 22:36:16 :: Connecting to wireless network WRT54G

2010/03/14 22:36:16 :: Putting interface down

2010/03/14 22:36:16 :: Releasing DHCP leases...

2010/03/14 22:36:16 :: Setting false IP...

2010/03/14 22:36:17 :: Stopping wpa_supplicant

2010/03/14 22:36:17 :: Flushing the routing table...

2010/03/14 22:36:17 :: Putting interface up...

2010/03/14 22:36:19 :: Generating psk...

2010/03/14 22:36:19 :: Attempting to authenticate...

2010/03/14 22:36:19 :: Exception in thread Thread-3:

2010/03/14 22:36:19 :: Traceback (most recent call last):

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/threading.py", line 525, in __bootstrap_inner

2010/03/14 22:36:19 ::     self.run()

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/site-packages/wicd/networking.py", line 341, in run

2010/03/14 22:36:19 ::     self._connect()

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/site-packages/wicd/networking.py", line 866, in _connect

2010/03/14 22:36:19 ::     self.generate_psk_and_authenticate(wiface)

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/site-packages/wicd/networking.py", line 72, in wrapper

2010/03/14 22:36:19 ::     return func(self, *__args, **__kargs)

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/site-packages/wicd/networking.py", line 971, in generate_psk_and_authenticate

2010/03/14 22:36:19 ::     wiface.Authenticate(self.network)

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/site-packages/wicd/wnettools.py", line 192, in newfunc

2010/03/14 22:36:19 ::     return func(self, *args, **kwargs)

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/site-packages/wicd/wnettools.py", line 1136, in Authenticate

2010/03/14 22:36:19 ::     misc.Run(cmd)

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/site-packages/wicd/misc.py", line 119, in Run

2010/03/14 22:36:19 ::     close_fds=fds, cwd='/', env=tmpenv)

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/subprocess.py", line 621, in __init__

2010/03/14 22:36:19 ::     errread, errwrite)

2010/03/14 22:36:19 ::   File "/usr/lib64/python2.6/subprocess.py", line 1126, in _execute_child

2010/03/14 22:36:19 ::     raise child_exception

2010/03/14 22:36:19 :: TypeError: coercing to Unicode: need string or buffer, NoneType found

2010/03/14 22:36:19 :: 

2010/03/14 22:36:19 :: Sending connection attempt result Failed

2010/03/14 22:36:27 :: Autoconnecting...

2010/03/14 22:36:27 :: No wired connection present, attempting to autoconnect to wireless network

2010/03/14 22:36:27 :: hidden

2010/03/14 22:36:28 :: Unable to autoconnect, you'll have to manually connect

2010/03/14 22:39:47 :: Autoconnecting...

2010/03/14 22:39:47 :: No wired connection present, attempting to autoconnect to wireless network

2010/03/14 22:39:47 :: hidden

2010/03/14 22:39:47 :: Unable to autoconnect, you'll have to manually connect

2010/03/14 22:39:50 :: Daemon going down, killing wicd-monitor...

2010/03/14 22:39:50 :: Removing PID file...

2010/03/14 22:39:50 :: Shutting down...

```

Before try wicd, I use service wpa_supplicant and dhcpcd that are both set to default level to startup my WiFi.

The following is my steps to try wicd:

emerge wicd

stop service wpa_supplicant and dhcpcd

/etc/init.d/wicd start

wicd-gtk

----------

## jett

This trace that I'm getting seems to have a little more detail: 

```
2010/09/28 22:23:56 :: Attempting to authenticate...

2010/09/28 22:23:56 :: ['wpa_supplicant', '-B', '-i', 'wlan0', '-c', '/var/lib/wicd/configurations/0026f2c8ee9c', '-D', None]

2010/09/28 22:23:56 :: Exception in thread Thread-5:

2010/09/28 22:23:56 :: Traceback (most recent call last):

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner

2010/09/28 22:23:56 ::     self.run()

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/site-packages/wicd/networking.py", line 341, in run

2010/09/28 22:23:56 ::     self._connect()

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/site-packages/wicd/networking.py", line 866, in _connect

2010/09/28 22:23:56 ::     self.generate_psk_and_authenticate(wiface)

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/site-packages/wicd/networking.py", line 72, in wrapper

2010/09/28 22:23:56 ::     return func(self, *__args, **__kargs)

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/site-packages/wicd/networking.py", line 971, in generate_psk_and_authenticate

2010/09/28 22:23:56 ::     wiface.Authenticate(self.network)

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/site-packages/wicd/wnettools.py", line 192, in newfunc

2010/09/28 22:23:56 ::     return func(self, *args, **kwargs)

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/site-packages/wicd/wnettools.py", line 1136, in Authenticate

2010/09/28 22:23:56 ::     misc.Run(cmd)

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/site-packages/wicd/misc.py", line 119, in Run

2010/09/28 22:23:56 ::     close_fds=fds, cwd='/', env=tmpenv)

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/subprocess.py", line 623, in __init__

2010/09/28 22:23:56 ::     errread, errwrite)

2010/09/28 22:23:56 ::   File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child

2010/09/28 22:23:56 ::     raise child_exception

2010/09/28 22:23:56 :: TypeError: coercing to Unicode: need string or buffer, NoneType found

```

I'm trying to find out why the value 'None' is being passed as the driver (-D parameter for the wpa_supplicant call)

----------

## cach0rr0

wondering if this is another WIRELESS_EXT quirk 

Am I to assume you can connect to the AP manually via wpa_supplicant? 

I'd not found this before just now (but it's affected me too) - https://bugs.gentoo.org/show_bug.cgi?id=321663

Anyway, same ol question, can you associate/auth with wpa_supplicant directly, and do you have CONFIG_WIRELESS_EXT enabled in your kernel? 

(wicd is broken for me as well with iwlagn, still fine for ath9k box but I haven't updated in a bit - hopefully combined brain power can solve it)

----------

## jett

I'm using the Wicd Network Manager, and found that I have a connection upon reboot, but after losing the connection, wicd wasn't able to reconnect.  I traced the problem back to the log I entered above where the call to the wpa_supplicant program did not define a driver (-D<None>).

I was able to start wpa_supplicant manually using my config file and the -Dwext, but wicd would still try to run the command without specifying a driver.

Instead of looking in the config files, I went through wicd's menus and found the Driver selection under the Advanced tab of Preferences.  I had not explicitly chosen wext before, but it was presented as what I had chosen.  I explicitly chose wext, and now it works:

```
2010/09/29 08:53:51 :: Attempting to authenticate...

2010/09/29 08:53:51 :: ['wpa_supplicant', '-B', '-i', 'wlan0', '-c', '/var/lib/wicd/configurations/0026f2c8ee9c', '-D', 'wext']

```

I may have gotten into this state because I didn't think I needed wpa_supplicant when I first tried to use wicd.  The documentation I read implied WPE did not require wpa_supplicant, so I didn't install this until after I had been playing with wicd for a while.  I have not tested that theory.

----------

