Hi,
I am receiving the below error message when downloading json file from a feature layer collection. The script is running on a windows PC at work.
However, at home, on windows as well, the script works perfectly and the json file is parsed and loaded into a file geodatabase.
ERROR 001558: Error parsing json file <filename.json>. A general error when some thing is wrong with a Field. [<fieldname>].
Failed to execute (JSONToFeatures).
The field in question holds the global id.
I have compared the temp json files downloaded at home and on the work PC and they are exactly the same.
The code is being run in VS Code on both machines.
Thanks very much for any ideas anyone may have.
for lyr in itemObject.layers:
# output feature class name
out_fc = '{}'.format(re.sub(r'[^A-Za-z0-9]+', '', lyr.properties.name))
# TableName is now original name, minus any spaces.
# use query to return a feature set object
export = lyr.query(query="owner:" + gis.users.me.username, item_type="Feature Layer") # url of sub layer.
print("Create export for: {}".format(out_fc))
# Works fine to this point.
# The "export.save...." is the section that fails, as it tries to parse the json file.
export.save(os.path.join(gdblocation, gdbname), out_fc) # save json file of layer to fgdb.