0

我正在学习教程“从源文件中提取数据”。我可以按照描述上传文件,但是当我尝试将文件转换为 SVF 时,它会因“TranslationWorker-InternalFailure”而失败。使用 Blender 创建的 3ds 文件和使用 Autodesk Fusion 360 创建的 f3d 都出现相同的错误。

这是我的代码(python):

r=requests.post(
    'https://developer.api.autodesk.com/modelderivative/v2/designdata/job',
    headers={
        'authorization':'{0} {1}'.format(auth_type,auth_token)
    },
    json={
        "input": {
            "urn": urn_cube_base64,
        },
        "output": {
            "formats": [
                {
                    "type": "svf",
                    "views": [
                        "2d",
                        "3d"
                    ]
                }
            ]
        }
    }
)
print r.json()

while True:
    r=requests.get('https://developer.api.autodesk.com/modelderivative/v2/designdata/{0}/manifest'.format(urn_cube_base64),
        headers={
            'authorization':'{0} {1}'.format(auth_type,auth_token)
        },
    )
    print r.text
    rj=r.json()
    progress=rj['progress']
    status=rj['status']
    print rj['status'],progress
    if status in ('success','failed','timeout'):
        print json.dumps(rj,indent=2)
        break

它产生以下输出:

{
  "hasThumbnail": "false", 
  "status": "failed", 
  "derivatives": [
    {
      "hasThumbnail": "false", 
      "status": "failed", 
      "name": "LMV Bubble", 
      "messages": [
        {
          "message": "Extractor error code -1073741819", 
          "code": "TranslationWorker-InternalFailure", 
          "type": "error"
        }
      ], 
      "outputType": "svf", 
      "progress": "complete"
    }
  ], 
  "region": "US", 
  "version": "1.0", 
  "progress": "complete", 
  "type": "manifest", 
  "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dG1wX2J1Y2tldDEvY3ViZS4zZHM"
}
4

0 回答 0