Traceback (most recent call last): File "<stdin>", line 4, in <module> File "/usr/local/lib/python3.8/json/__init__.py", line 341, in loads raise TypeError(f'the JSON object must be str, bytes or bytearray, ' TypeError: the JSON object must be str, bytes or bytearray, not dict
Needs to be json.dumps() rather than json.loads().