That error is probably a side effect of the plugin not connecting to the wiimote. Try using the following code to connect to a wiimote:
Code:
wiimote = wii.addWiimote()
if not wiimote.valid():
viz.message("Failed to connect to wiimote")
sys.exit()
This will display an error and exit the script if a wiimote could not be found. If this is the case, then you need to make sure your Bluetooth driver is connected to the wiimote.