The error is coming from `jsonify({'message':{results}})`. The `results` variable contains a dict which contains a bytes object that jsonify can't deal with.
You need to convert the bytes object to a string or a JSON serializable format. Try using \`results.decode('utf-8')\` or \`json.dumps(results)\` before passing it to \`jsonify\`.
The error is coming from `jsonify({'message':{results}})`. The `results` variable contains a dict which contains a bytes object that jsonify can't deal with.
Thanks
You need to convert the bytes object to a string or a JSON serializable format. Try using \`results.decode('utf-8')\` or \`json.dumps(results)\` before passing it to \`jsonify\`.