Reputation: 67
I am trying to run a Revit plugin on Design Automation. Workitem fails with failedInstructions error. In the logs I can find "Error details: The system cannot find the file specified." Does that refer to the Revit file? Or the AppBundle? The input file is from BIM 360, the workitem contains a link and the header to download the Revit file and it seems like there are no issues there. I have also debugged the plugin locally using DesignAutomationHandler and that seems to work fine. Not sure what's missing.
[05/20/2022 20:39:12] Job information:
"CommandLine":[
"\"$(engine.path)/revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[Revit2ProtoExporter].path)\""
]
"Settings":{
"dasreportfaileduploadoptional": {
"value": "true",
"isEnvironmentVariable": true
}
}
"Id":"bc24e48e8f7548fe9262db12a7556055"
"ActivityId":"WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporterActivity+OV"
"Engine.Id":"Autodesk.Revit_2022!84"
"Apps": [
"App.Id":"WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporter!72"
]
"BoundArguments":{
"rvtFile": {
"localName": "rac_basic_sample_project.rvt",
"url": "https://developer.api.autodesk.com/Masked:kRW0jj8ZUtU7QNO0DXCukH2NDJ4=",
"headers": {
"authorization": "Masked:IlrS8QJ3oW3Igi6Oe34QAwULA1Q="
}
},
"params": {
"localName": "params.json",
"url": "data:application/json,{'ViewName': {3D}}"
},
"result": {
"localName": "result.avr",
"url": "https://staging-appliedvrabs-pa.sandbox.googleapis.com/Masked:kQfE75mPkbGJwltY96k4UwHYNNY=",
"headers": {
"authorization": "Masked:GbZcVdSF7CkXGH0+4kYm/FaeCao="
},
"verb": "put"
},
"onProgress": {
"ondemand": true,
"url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Masked:UK/Z3b5X3xUWxXiH6C9r9i9UlRU=",
"headers": {
"Content-Type": "application/json",
"x-das-authorize": "awssigv4(us-east-1)",
"x-ads-token-data": "{\"access_token\":{\"client_id\":\"WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI\"},\"scope\":\"code:all data:write data:read bucket:create bucket:delete\",\"expires_in\":3599,\"client_id\":\"WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI\"}",
"x-ads-gateway-secret": "Masked:F6VCvje5cIP0zOGCxgARjmSopQI="
},
"verb": "put"
}
}
"Quotas":{
"limitProcessingTimeSec": 10800,
"limitTotalUncompressedAppsSizeInMB": 5000
}
[05/20/2022 20:39:13] Starting work item bc24e48e8f7548fe9262db12a7556055
[05/20/2022 20:39:13] Start download phase.
[05/20/2022 20:39:13] Start downloading input: verb - 'GET', url - 'https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/47f2a6e6-4349-4a9e-b066-14019b2d95ff.rvt'
[05/20/2022 20:39:13] Embedded resource [{'ViewName': {3D}}] is saved as file: T:\Aces\Jobs\bc24e48e8f7548fe9262db12a7556055\params.json.
[05/20/2022 20:39:14] End downloading file. Source=https://developer.api.autodesk.com/oss/v2/buckets/wip.dm.prod/objects/47f2a6e6-4349-4a9e-b066-14019b2d95ff.rvt,LocalFile=T:\Aces\Jobs\bc24e48e8f7548fe9262db12a7556055\rac_basic_sample_project.rvt,BytesDownloaded=18739200,Duration=1107ms
[05/20/2022 20:39:14] End download phase successfully.
[05/20/2022 20:39:16] Start preparing script and command line parameters.
[05/20/2022 20:39:16] Command line: []
[05/20/2022 20:39:16] Identified standalone application at T:\Aces\AcesRoot\22.0\coreEngine\Exe/revitcoreconsole.exe /i T:\Aces\Jobs\bc24e48e8f7548fe9262db12a7556055\rac_basic_sample_project.rvt /al T:\Aces\Applications\53f4ce6d27cb3f9b8d6727a1bc6e1b36.WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporter[72].package.
[05/20/2022 20:39:16] End preparing script and command line parameters.
[05/20/2022 20:39:16] Start script phase.
[05/20/2022 20:39:16] Start application 53f4ce6d27cb3f9b8d6727a1bc6e1b36.WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporter[72].package standard output dump.
[05/20/2022 20:39:16] command line:'"T:\Aces\AcesRoot\22.0\coreEngine\Exe/revitcoreconsole.exe /i T:\Aces\Jobs\bc24e48e8f7548fe9262db12a7556055\rac_basic_sample_project.rvt /al T:\Aces\Applications\53f4ce6d27cb3f9b8d6727a1bc6e1b36.WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporter[72].package" /isolate HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_bc24e48e8f7548fe9262db12a7556055 T:\Aces\Jobs\bc24e48e8f7548fe9262db12a7556055\userdata'
[05/20/2022 20:39:16] CreateProcess fails [ErrorCode:2]
[05/20/2022 20:39:16] Error details: The system cannot find the file specified.
[05/20/2022 20:39:17] End application 53f4ce6d27cb3f9b8d6727a1bc6e1b36.WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporter[72].package standard output dump.
[05/20/2022 20:39:17] Error: Application 53f4ce6d27cb3f9b8d6727a1bc6e1b36.WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporter[72].package exits with code 2 which indicates an error.
[05/20/2022 20:39:17] End script phase.
[05/20/2022 20:39:17] Error: An unexpected error happened during phase CoreEngineExecution of job.
[05/20/2022 20:39:17] Job finished with result FailedExecution
[05/20/2022 20:39:17] Job Status:
{
"status": "failedInstructions",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI/bc24e48e8f7548fe9262db12a7556055/report.txt?X-Amz-Expires=48600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEDUaCXVzLWVhc3QtMSJHMEUCIQD6%2F06ilWih8Y%2FlExEFSRdV29%2BkhzC9dnUiSRgrowI%2F3AIgWW0dFM7mesUZ9r%2Fay0jRdYM5WS5WLaKE70dUdIJ6pdIqmwIIHRADGgwyMjA0NzMxNTIzMTAiDBvJL%2Faj9DnxZRlQoir4AawLQ9ux77C8%2FCXfmKxVn52VplNguYCnlxSoCU6fZcEcXIJzLByNiYn%2Fh4cNZ7Pi%2B5yD%2FBQz9E%2FK7YxddYqRWn6%2FTJlT79dVYoCvigOP4sYClYT7Khqxpnlzdq%2FFKSPrhwVCeBJNBLLdgFXJywVasJqb95nXz%2FEb4zl1459EB7f1L%2BmMpiCi%2BpQgtXmybqC6YIoZAzRlQFGqOsdi%2FrpucSRTFz85uzXKe95ycI3u6AkjB9qIeFus%2FoGuSHCWmIYCLuFxv6N4paqXsf%2FGL4k0eaxlT8vvqc4BOfVSoKkSDP3asDWUTPBctRHllVn4JVYESTux805TB4i8MNDqn5QGOpoBFkJEETYYcw40DufOBaHwnASy1zn6lcSt3K3yDjzYZCJFrrO6sT0YT3Q0poH1W4Pn74YAHb0MFay8WspSghCNcUc5JrL1j1aqDchne8nCLu2tRJQXwIQD6ddJ7AXMnNVfrd12y%2FZlj1gjJxjKXsEK6syt2xg5LDmmMe%2F1iu40qxVq%2Bv3%2BjmsR05Fz52T3oIyuWYNjqojdudPwFA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIATGVJZKM3ITCDHE4L/20220520/us-east-1/s3/aws4_request&X-Amz-Date=20220520T203912Z&X-Amz-SignedHeaders=host&X-Amz-Signature=9b56fe0c0ac8fd968acdbb72ba073ab1041f3946e929d23d88ad885149bdbf66",
"stats": {
"timeQueued": "2022-05-20T20:39:12.695924Z",
"timeDownloadStarted": "2022-05-20T20:39:12.957438Z",
"timeInstructionsStarted": "2022-05-20T20:39:16.3503525Z",
"timeInstructionsEnded": "2022-05-20T20:39:17.5424815Z",
"bytesDownloaded": 18739218
},
"id": "bc24e48e8f7548fe9262db12a7556055"
}
Here is the activity definition:
url = '{0}/activities/{1}/versions'.format(self._das_api_root,
self.get_activity_name())
headers = self._get_request_headers()
data = {}
data['commandLine'] = [
'"$(engine.path)/revitcoreconsole.exe '
'/i $(args[rvtFile].path) '
'/al $(appbundles[' + self.get_app_bundle_name() + '].path)"'
]
data['parameters'] = {}
data['parameters']['rvtFile'] = {}
data['parameters']['rvtFile']['zip'] = False
data['parameters']['rvtFile']['ondemand'] = False
data['parameters']['rvtFile']['verb'] = 'get'
data['parameters']['rvtFile']['description'] = 'Input'
data['parameters']['rvtFile']['required'] = True
data['parameters']['params'] = {}
data['parameters']['params']['localName'] = 'params.json'
data['parameters']['params']['verb'] = 'get'
data['parameters']['params']['required'] = True
data['parameters']['result'] = {}
data['parameters']['result']['zip'] = False
data['parameters']['result']['ondemand'] = False
data['parameters']['result']['verb'] = 'put'
data['parameters']['result']['description'] = 'Result'
data['parameters']['result']['required'] = True
data['parameters']['result']['localName'] = 'result.avr'
data['engine'] = 'Autodesk.Revit+2022'
data['appbundles'] = [self.get_app_bundle()]
data['description'] = 'Export Geometry'
# Attempt to update the Activity.
response = requests.post(url, json=data, headers=headers)
And here is the workitem definition:
url = '{0}/workitems'.format(self._das_api_root)
headers = self._get_request_headers()
data = {}
data['activityId'] = self._activity_id
data['arguments'] = {}
data['arguments']['rvtFile'] = {}
data['arguments']['rvtFile']['url'] = download_url
data['arguments']['rvtFile']['localName'] = revit_file_name
data['arguments']['rvtFile']['headers'] = download_header
data['arguments']['params'] = {}
data['arguments']['params']['url'] = "data:application/json,{{'ViewName': {0}}}".format(view_name)
data['arguments']['result'] = {}
data['arguments']['result']['verb'] = 'put'
data['arguments']['result']['url'] = upload_url
data['arguments']['result']['headers'] = upload_header
response = self._http_client.request(url, 'POST', json.dumps(data), headers = headers)
Upvotes: 1
Views: 213
Reputation: 275
By having a closer look at the report above, the problem is at the command line.
"T:\Aces\AcesRoot\22.0\coreEngine\Exe/revitcoreconsole.exe /i T:\Aces\Jobs\bc24e48e8f7548fe9262db12a7556055\rac_basic_sample_project.rvt /al T:\Aces\Applications\53f4ce6d27cb3f9b8d6727a1bc6e1b36.WDQIfAV8PqNa9XSKPmv6MDu3xAtLGfXI.Revit2ProtoExporter[72].package"
cannot be identified as an executable, so it complained "Error details: The system cannot find the file specified."
The correct way to define command line, e.g.
"commandLine": [ "$(engine.path)\\\\revitcoreconsole.exe /i \"$(args[rvtFile].path)\" /al \"$(appbundles[RVTIOExportTestPackage2019].path)\"" ]
See the quotes around $(args[rvtFile].path)
and $(appbundles[RVTIOExportTestPackage2019].path)
Upvotes: 1