Aug-27-2018, 11:18 AM
the third line of this sequence is the culprit:
There should be more that explains what the issue is.
somewhere in the __init__ method of AutomationTestingPage_ITOM class you need to define ser
(self.ser = whatever)
then when referencing ser in other methods use self.ser
example in data_tx method,
def __init__(self, child): Tkinter.Frame.__init__(self, child) autotest = Testing.TestingPage()The first error message doesn't seem to be complete. Did you post the whole error?
There should be more that explains what the issue is.
somewhere in the __init__ method of AutomationTestingPage_ITOM class you need to define ser
(self.ser = whatever)
then when referencing ser in other methods use self.ser
example in data_tx method,
def data_tx(self): element = [0x4D, 0x08, 0xFF, 0x06, 0x1A, 0x52] data = bytearray(element) self.ser.write(data) receivedata = (self.ser.read(7)) data1 = binascii.b2a_hex(receivedata) data2 = ord(receivedata[6]) return data2