I am using ipfshttpclient to connect with ipfs and add .json file but when i run client.get(hash) it returns none and when i run client.cat(hash) it returns "TypeError: Object of type bytes is not JSON serializable "
my code
comment=request.form[‘comment’]
block_number=request.form[‘bn’]
print(block_number)
post_record={‘comment’:comment}
with open(‘comment.json’, ‘w’) as outfile:
json.dump(post_record, outfile)
client = ipfshttpclient.connect()
res=client.add(‘comment.json’)
block_record_list[0][int(block_number)]=“https://ipfs.io/ipfs/”+ res[“Hash”]
response=block_record_list[0][int(block_number)]
response=client.cat(res[“Hash”])
return jsonify(response), 200