When I run this code:
stdout = Popen(callbackquery, shell=True, stdout=PIPE).stdout
output = stdout.read()
if output.find("No records were found that matched the search criteria") == -1:
print(output)
else:
# Do nothing
print("It's fine")
I get the following error:
if output.find("No records were found that matched the search criteria") == -1:
TypeError: 'str' does not support the buffer interface
I understand that this is to do with character encoding but I don't know where and how I need to convert this?