Aug-27-2018, 11:29 AM
The above mentioned things i tried as you mentioned previously in the comment.
Actually ser is define in Testing.py class where i'm selecting the serial port and baud rate and same variable i want to use in AutomationTesting.py file particularly in data function to write the data using serial port. But while compiling the script i'm getting error at that particular line in ser.write.
Actually ser is define in Testing.py class where i'm selecting the serial port and baud rate and same variable i want to use in AutomationTesting.py file particularly in data function to write the data using serial port. But while compiling the script i'm getting error at that particular line in ser.write.
Error:Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1541, in __call__
return self.func(*args)
File "D:\PyCharm\Main_Project_75F\Separate_GUI_Class\AutomationTesting_ITOM.py", line 176, in clicked
self.txt1.insert(END, self.data_tx())
File "D:\PyCharm\Main_Project_75F\Separate_GUI_Class\AutomationTesting_ITOM.py", line 168, in data_tx
ser.write(data)
AttributeError: 'str' object has no attribute 'write'