Learning widgets and handling different error types on iPython