Python 2.7 AttributeError:attribute';端口';属于';liblo._ServerBase';对象不可写

Python 2.7 AttributeError:attribute';端口';属于';liblo._ServerBase';对象不可写,python-2.7,Python 2.7,我有muse头带和arduino。我想从muse那里获取数据,并将它们交给arduino进行一些计算 #define libs from liblo import * import sys import time import serial import math #define arduino serial way ser = serial.Serial

我有muse头带和arduino。我想从muse那里获取数据,并将它们交给arduino进行一些计算

        #define libs
        from liblo import *
        import sys
        import time
        import serial
        import math

           #define arduino serial way
           ser = serial.Serial('/dev/ttyACM0')

           #class
           class MuseServer(ServerThread):

#listen for messages on port 5000
def __init__(self):
    ServerThread.__init__(self, port=5000)
    self.port=5000
    self.alpha = 0.0

  # take datas from device
  @make_method('/muse/acc', 'fff')
  def acc_callback(self, path, args):
  acc_x, acc_y, acc_z = args
  print "%s %f %f %f" % (path, acc_x, acc_y, acc_z)

       #connect to device
       try:
       server = MuseServer()
       except ServerError, err:
       print str(err)
       sys.exit()

       server.start()

       if __name__ == "__main__":
       while 1:
       time.sleep(1)
在终端上运行时,我看到“AttributeError:liblo.\u ServerBase”对象的属性“port”不可写”错误

我使用Python2.7