cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Error with Edge Microserver

clansdale
11-Garnet

Error with Edge Microserver

I am trying to build a simple application with the Edge Microserver in order to update the properties of a thing in the Thingworx core.  I am using a put request in Python in order to write the data.  When running the program I see an error on the Microserver as follows:

twInfoTable_ToJson: NULL of bad infotable

Does anyone know what this error means or how I can fix it?

Thanks!

Currently my python code is this:

#!/usr/bin/python

import requests

import sys

import json

import logging

logging.basicConfig()

logging.getLogger().setLevel(logging.DEBUG)

requests_log = logging.getLogger("requests.packages.urllib3")

requests_log.setLevel(logging.DEBUG)

requests_log.propagate = True

appKey = 'xxxxxxxxx'

Webhost = "http://localhost:8000/Thingworx/Things/RT2/Properties/*"

payload = [{'Color': 'green', 'Size': 108}]

headers = { 'Content-Type': 'application/json', 'appKey': appKey }

response = requests.put(Webhost, headers=headers, json=payload, verify=True)

print(response)

The configuration json for the edge microserver is this:

{

    "ws_servers":    [{

            "host":    "<host_ip>",

            "port":    80

        }],

    "appKey":    "xxxxxxxx",

    "ws_connection": {

        "encryption": "none"

    },

   

    "certificates": {

        "validate": false,

        "allow_self_signed": true

    },

   

    "http_server": {

        "host" : "localhost",

        "port" : 8000,

        "ssl" : false,

        "authenticate" : false

    }

}

1 REPLY 1
alex.augot
5-Regular Member
(To:clansdale)

Hi Connor,

That error points to issues converting a native InfoTable into JSON data, but it's difficult to really say what's going on without more context.  Can you try setting your log level to 'TRACE'  in config.json and posting a bit of the log where you see the error.

Top Tags