I have several lines of code which (purely whilst fixing and testing a complex bit of code) i've interchangeably and unintentionally switched between debugLog() and errorLog().
- Code: Select all
self.debugLog("Validating slots {}".format(slotID)) #Line 118
self.debugLog("Validating slotx {}".format(type(slotID))) #Line 119
self.errorLog("Validating slotz {}".format(slotID)) #Line 120
self.debugLog(type(slotID)) #Line 122
self.debugLog("self.tSlot {} = type(slotID) of type {}".format(self.tSlot[slotID],type(self.tSlot[slotID]))) #Line 124
self.errorLog("Slot {} is occupied by device ".format(self.tSlot[slotID])) #Line 125
- Code: Select all
2020-05-15 23:19:07.474 EnergyLink Debug Validating slot 6 #Line 106
2020-05-15 23:19:17.449 EnergyLink Debug Validating slot 2 #Line 106
2020-05-15 23:19:17.453 EnergyLink Debug Validating slots 2 #Line 118
2020-05-15 23:19:17.453 EnergyLink Debug Validating slotx <type 'int'> #Line 119
2020-05-15 23:19:17.454 EnergyLink Error Error in plugin execution UiValidate:
Traceback (most recent call last):
File "plugin.py", line 120, in validateDeviceConfigUi
TypeError: 'str' object is not callable
I've been going round and round with working out why slotID was causing such errors, then I realised it's actually errorLog() that doesn't like it - debugLog() is fine with it.
Any thoughts?