Python bridge connection refused

Hello any time i call Bridge.put or the Bridge.get method in my python code i keep getting a socket error code 146 connection refused i even get this error on bridge examples.Even calling Bridge.begin results in the same error.What would cause this?Thanks

First initialize the Bridge library on the Arduino side

For example:

On the Arduino side:

#include <Bridge.h>

char D13value[2];

void setup() {
  pinMode(13, OUTPUT);

void loop() {
  Bridge.get("D13", D13value, 2);
  int D13int = atoi(D13value);
  digitalWrite(13, D13int);

On the Linux side:

#!/usr/bin/env python2

import sys

sys.path.insert(0, '/usr/lib/python2.7/bridge/')

from bridgeclient import BridgeClient as bridgeclient

client = bridgeclient()

client.put('D13', '1')