Hello,
What is the problem with following code?
import sqlite3 import json def sl(): conn = sqlite3.connect('cidb.db') cur = conn.cursor() cur.execute("SELECT cisdb FROM sw1;") one_result = cur.fetchone() st = int(one_result[0]) return st cis = sl() channel = {} channel["prtg"] = {"result":[{"channel" : "Status","value" : cis }]} print(json.dumps(channel))
XML: Structural error in xml file, 1 open items. -- JSON: The returned JSON does not match the expected structure (Invalid JSON.). (code: PE231)
Add comment