Jake Skinner
Thanks you for the alternative. I'm converting a script I had working in 2.7. With requests I'm able to generate a token but getting an error message when i try to query the service to see when a point was added.
The error is : TypeError: the JSON object must be str, bytes or bytearray, not 'dict'
Here is the bit of code giving me problems. Any thoughts? Thank you!
params = {'f': 'pjson', 'where': "1=1", 'outfields': 'OBJECTID_1, AssetID, Status, Location, Notes ', 'returnGeometry': 'false', 'token' : token}
req = requests.post(tokenURL, data=params, verify=False)
response =json.loads(req.content)
data = json.loads(response)
for feat in data['features']:
Status = feat['attributes']['Status']
if Status == 6:
oidList.append(feat['attributes'][uniqueID])
AssetID.append(str(feat['attributes']['AssetID']))
Location.append(str(feat['attributes']['Location']))
Notes.append(str(feat['attributes']['Notes']))