Autodesk ATF-1008 Error - autodesk

I am getting an ATF-1008 error which has no explanation when translating files that previously worked fine. What does the ATF-1008 error mean?
{
"guid" : "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6c3RlbW4vNTkxY2U3NzAzNzFhMjEwMmM3MWQwMTgzLWZ3bGMza2x2ODBvNGN0bXZjMm94c3djZGkuaXB0",
"success" : "0%",
"hasThumbnail" : "false",
"progress" : "complete",
"urn" : "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6c3RlbW4vNTkxY2U3NzAzNzFhMjEwMmM3MWQwMTgzLWZ3bGMza2x2ODBvNGN0bXZjMm94c3djZGkuaXB0",
"status" : "failed",
"startedAt" : "Thu May 18 05:29:50 UTC 2017",
"region" : "US",
"owner" : "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6c3RlbW4vNTkxY2U3NzAzNzFhMjEwMmM3MWQwMTgzLWZ3bGMza2x2ODBvNGN0bXZjMm94c3djZGkuaXB0",
"type" : "design",
"children" : [
{
"guid" : "aa85aad6-c480-4a35-9cbf-4cf5994a25ba",
"messages" : [
{
"type" : "error",
"code" : "ATF-1008",
"message" : [
"Error: {0}",
"C:\\worker\\viewing-inventor-lmv\\tmp\\job-1\\264\\591ce770371a2102c71d0183-fwlc3klv80o4ctmvc2oxswcdi.ipt"
]
}
],
"hasThumbnail" : "false",
"role" : "viewable",
"version" : "2.0",
"progress" : "complete",
"urn" : "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6c3RlbW4vNTkxY2U3NzAzNzFhMjEwMmM3MWQwMTgzLWZ3bGMza2x2ODBvNGN0bXZjMm94c3djZGkuaXB0",
"status" : "success",
"type" : "folder"
}
]
}

I found that the file had become corrupt after uploading to Forge OSS without supplying a Content-Length header. After attempting to convert this file I would get this error. By inspecting the original file contents I was able to see the file had not uploaded as expected.

Related

Jmeter: Extracting JSON response with special/spaces characters

Hello can someone help me extract the value of user parameter which is "testuser1"
I tried to use this JSON Path expression $..data I was able to extract the entire response but unable to extract user parameter. Thanks in advance
{
"data": "{ "took" : 13, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 1.0, "hits" : [ { "_index" : "bushidodb_history_network_eval_ea9656ef-0a9b-474b-8026-2f83e2eb9df1_2021-april-10", "_type" : "network", "_id" : "6e2e58be-0ccf-3fb4-8239-1d4f2af322e21618059082000", "_score" : 1.0, "_source" : { "misMatches" : [ "protocol", "state", "command" ], "instance" : "e3032804-4b6d-3735-ac22-c827950395b4|0.0.0.0|10.179.155.155|53|UDP", "protocol" : "UDP", "localAddress" : "0.0.0.0", "localPort" : "12345", "foreignAddress" : "10.179.155.155", "foreignPort" : "53", "command" : "ping yahoo.com ", "user" : "testuser1", "pid" : "10060", "state" : "OUTGOINGFQ", "rate" : 216.0, "originalLocalAddress" : "192.168.100.229", "exe" : "/bin/ping", "md5" : "f9ad63ce8592af407a7be43b7d5de075", "dir" : "", "agentId" : "abcd-dcd123", "year" : "2021", "month" : "APRIL", "day" : "10", "hour" : "12", "time" : "1618059082000", "isMerged" : false, "timestamp" : "Apr 10, 2021 12:51:22 PM", "metricKey" : "6e2e58be-0ccf-3fb4-8239-1d4f2af322e2", "isCompliant" : false }, "sort" : [ 1618059082000 ] } ] }, "aggregations" : { "count_over_time" : { "buckets" : [ { "key_as_string" : "2021-04-10T08:00:00.000-0400", "key" : 1618056000000, "doc_count" : 1 } ] } }}",
"success": true,
"message": {
"code": "S",
"message": "Get Eval results Count Success"
}
}
Actual Response:
Images
What you posted doesn't look like a valid JSON to me.
If in reality you're getting what's in your image, to wit:
{
"data": "{ \"took\" : 13, \"timed_out\" : false, \"_shards\" : { \"total\" : 5, \"successful\" : 5, \"skipped\" : 0, \"failed\" : 0 }, \"hits\" : { \"total\" : 1, \"max_score\" : 1.0, \"hits\" : [ { \"_index\" : \"bushidodb_history_network_eval_ea9656ef-0a9b-474b-8026-2f83e2eb9df1_2021-april-10\", \"_type\" : \"network\", \"_id\" : \"6e2e58be-0ccf-3fb4-8239-1d4f2af322e21618059082000\", \"_score\" : 1.0, \"_source\" : { \"misMatches\" : [ \"protocol\", \"state\", \"command\" ], \"instance\" : \"e3032804-4b6d-3735-ac22-c827950395b4|0.0.0.0|10.179.155.155|53|UDP\", \"protocol\" : \"UDP\", \"localAddress\" : \"0.0.0.0\", \"localPort\" : \"12345\", \"foreignAddress\" : \"10.179.155.155\", \"foreignPort\" : \"53\", \"command\" : \"pingyahoo.com\", \"user\" : \"testuser1\", \"pid\" : \"10060\", \"state\" : \"OUTGOINGFQ\", \"rate\" : 216.0, \"originalLocalAddress\" : \"192.168.100.229\", \"exe\" : \"/bin/ping\", \"md5\" : \"f9ad63ce8592af407a7be43b7d5de075\", \"dir\" : \"\", \"agentId\" : \"abcd-dcd123\", \"year\" : \"2021\", \"month\" : \"APRIL\", \"day\" : \"10\", \"hour\" : \"12\", \"time\" : \"1618059082000\", \"isMerged\" : false, \"timestamp\" : \"Apr10, 202112: 51: 22PM\", \"metricKey\" : \"6e2e58be-0ccf-3fb4-8239-1d4f2af322e2\", \"isCompliant\" : false }, \"sort\" : [ 1618059082000 ] } ] }, \"aggregations\" : { \"count_over_time\" : { \"buckets\" : [ { \"key_as_string\" : \"2021-04-10T08: 00: 00.000-0400\", \"key\" : 1618056000000, \"doc_count\" : 1 } ] } }}",
"success": true,
"message": {
"code": "S",
"message": "Get Eval results Count Success"
}
}
the easiest way is just using 2 JSON Extractors:
Extract data attribute value into a JMeter Variable from the response
Extract user attribute value into a JMeter variable from ${data} JMeter Variable:
Demo:
If the response looks like exactly you posted you won't be able to use JSON Extractors and will have to treat it as normal text so your choice is limited to Regular Expression Extractor, example regular expression:
"user"\s*:\s*"(\w+)"
Add Regular Expression extractor with the corresponding request and extract it. Use the below expression.
Expression: "user" : "(.*?)"
Ref: https://jmeter.apache.org/usermanual/regular_expressions.html
Regular Expression Extractor Sample

JSON file to CSV file conversion when my JSON columns are dynamic

I found the solution for json to csv conversion. Below is the sample json and solution.
{
"took" : 111,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 2,
"relation" : "eq"
},
"max_score" : 1.0,
"hits" : [
{
"_index" : "alerts",
"_type" : "_doc",
"_id" : "1",
"_score" : 1.0,
"_source" : {
"alertID" : "639387c3-0fbe-4c2b-9387-c30fbe7c2bc6",
"alertCategory" : "Server Alert",
"description" : "Successfully started.",
"logId" : null
}
},
{
"_index" : "alerts",
"_type" : "_doc",
"_id" : "2",
"_score" : 1.0,
"_source" : {
"alertID" : "2",
"alertCategory" : "Server Alert",
"description" : "Successfully stoped.",
"logId" : null
}
}
]
}
}
The solution :
jq -r '.hits.hits[]._source | [ "alertID" , "alertCategory" , "description", "logId" ], ([."alertID",."alertCategory",."description",."logId" // "null"]) | #csv' < /root/events.json
The problem with this solution is that I have to hard code the column names. What If my json gets a few additions under _source tag later? I need a solution which can handle the dynamic data under _source. I am open to any other tool or command in shell.
Simply use keys_unsorted (or keys if you want them sorted). See e.g. Convert JSON array into CSV using jq or How to convert arbitrary simple JSON to CSV using jq? for two SO examples. There are many others too.

Using Curl and PUT request to edit JSON file

I'm trying to edit an endpoint on a REST API that gives me an array of objects. I want to edit the json file but I've been having trouble with formatting the HTTP request.
the output of the endpoint is something like
"result" : [
{
"MAC" : "00:08:00:4A:A1:B3",
"available" : true,
"bridge" : "br0",
"ipv4" : {
"dns1" : "",
"dns2" : "",
"gateway" : "",
"ip" : "",
"mask" : "",
"mode" : ""
},
"ipv6" : {
"delegatedPrefixLength" : 64,
"dns1" : "",
"dns2" : "",
"enabled" : false,
"fixedIp" : [],
"gateway" : "",
"ip" : [],
"linkLocalIp" : [],
"mode" : "DELEGATED",
"prefixDelegationEnabled" : false
},
"name" : "eth0",
"nitype" : "ETHER",
"type" : "LAN"
},
{
"available" : false,
"bridge" : "br0",
"ipv4" : {
"dns1" : "",
"dns2" : "",
"gateway" : "",
"ip" : "",
"mask" : "",
"mode" : ""
},
"ipv6" : {
"delegatedPrefixLength" : 64,
"dns1" : "",
"dns2" : "",
"enabled" : false,
"fixedIp" : [],
"gateway" : "",
"ip" : [],
"linkLocalIp" : [],
"mode" : "DELEGATED",
"prefixDelegationEnabled" : false
},
"name" : "eth1",
"nitype" : "ETHER",
"type" : "LAN"
}
]
I need to be able to append some fields in the first object in the array. I have tried
curl -k -X PUT -H "Content-Type: application/json" -d '{[{"ipv4":{"mode":"DHCP"},"name": "eth0", "type":WAN}]"}' https://192.168.2.1/api/ni?token=$token1
but I keep getting an error saying that it's expecting a and object/value/array.
Any suggestions?
It looks like your PUT data does not have a top-level JSON field:
{[{"ipv4":{"mode":"DHCP"}, ...
The API is probably expecting something like this:
{"request": [{"ipv4":{"mode":"DHCP"}, ...
Check your documentation & examples for that API.

Push data in json array MongoDB

I have the following structure in my mondoDB:
"source" : [
{
"source_id" : "800000021",
"source" : "Test1"
}
]
"state" : "AM",
"owner_phone" : "0",
"latitude" : 0,
"leedon_activated" : "True",
"zip_code" : "12345",
"fax" : "0",
I want to add another json to the source array for the following resut:
"source" : [
{
"source_id" : "800000021",
"source" : "Test1"
},
{
"source_id" : "800000022",
"source" : "Test2"
}
]
"state" : "AM",
"owner_phone" : "0",
"latitude" : 0,
"leedon_activated" : "True",
"zip_code" : "12345",
"fax" : "0"
What will be MongoDB query for it?
Read about $push here
Your code will something like this
yourmodelname.update({ /* some conditions to updating files */ },{$push: {"source": {"source_id" : "213123", "source" : "asdasd"}}})

Error importing JSON file in Parse

My current file looks like this:
{
"result": [
{
"Longitude" : "-075.947332",
"Zipcode" : "21922",
"ZipClass" : "STANDARD",
"County" : "CECIL",
"City" : "ELKTON",
"State" : "MD",
"Latitude" : "+39.593612"
},
{
"Longitude" : "-075.884544",
"Zipcode" : "21930",
"ZipClass" : "PO BOX ONLY",
"County" : "CECIL",
"City" : "GEORGETOWN",
"State" : "MD",
"Latitude" : "+39.366183"
}
]
}
I continuously get the following error:
file should have the following format
{ "results": [ {...}, ... ]}
Any ideas whats going on or how I can import my file.
The link to my file is right here for further understanding: http://gomashup.com/json.php?fds=geo/usa/zipcode/state/MD&jsoncallback=?
Note* (There is no "?" in my JSON file like data in above link.)
Looks like you need to change "result" to "results".
The file you linked to begins with a parenthesis ((), that might be an issue too.