The error message is:
Indigo Error Log Script.py, line 6, at top level
File '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/encodings/ascii.py', line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 27870: ordinal not in range(128)
Script Error trigger "Indigo Event Log Error Email v2" script error in file Indigo Error Log Script.py:
Script Error 'ascii' codec can't decode byte 0xc3 in position 27870: ordinal not in range(128)
Script Error Exception Traceback (most recent call shown last):
This error repeats endlessly until I restart the Indigo Server. Any suggestions?
- Code: Select all
logFilePath = indigo.server.getLogsFolderPath() + u"/indigo_log.txt"
check_list = (' Err ', ' err ', 'Error', 'error') # things to include
skip_list = ('errorState :', "Indigo Error Log Report", "Reset errorsDetected") # things to ignore
with open(logFilePath, "r") as infile:
logFile = infile.read()
# Get line when it contains anything in the checklist and not anything in the skip list.
errorLines = [line for line in logFile.split('\n')
if any(check in line for check in check_list)
and not any(skip in line for skip in skip_list)]
errorLines = ("\n".join(errorLines)) # converts list object to line-by-line string object
myAddress = "name@spectrum.com"
mySubject = "Indigo Error Log Report"
indigo.server.sendEmailTo(myAddress, subject=mySubject, body=errorLines)