Python Google API版本2上的API.ai操作:无法使用';无效的_参数';错误:";:找不到字段。”;

Python Google API版本2上的API.ai操作:无法使用';无效的_参数';错误:";:找不到字段。”;,python,dialogflow-es,actions-on-google,api-ai,Python,Dialogflow Es,Actions On Google,Api Ai,我正在使用python为Assistat应用程序创建webhook。我可以向用户请求位置许可,但只要用户同意,我就会收到以下错误 UnparseableJsonResponse API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: ": Cannot find field.". 我已经检查了我的webhook服务器,没有收到任何请求。这看起来像是API.ai方面的一些问题下面是使用P

我正在使用python为Assistat应用程序创建webhook。我可以向用户请求位置许可,但只要用户同意,我就会收到以下错误

UnparseableJsonResponse
API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: ": Cannot find field.".
我已经检查了我的webhook服务器,没有收到任何请求。这看起来像是API.ai方面的一些问题
下面是使用Python客户端时操作控制台的调试响应

{
  "assistantToAgentDebug": {
    "curlCommand": "curl -v '<URL>'{\"user\":{\"userId\":\"<USED_ID>\",\"locale\":\"en-US\"},\"conversation\":{\"conversationId\":\"1504592665563\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"defaultwelcomeintent-followup\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.PERMISSION\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"yes\"}],\"arguments\":[{\"name\":\"PERMISSION\",\"textValue\":\"true\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"device\":{\"location\":{\"coordinates\":{\"latitude\":37.4219806,\"longitude\":-122.0841979}}},\"isInSandbox\":true}'",
    "assistantToAgentJson": {
      "user": {
        "userId": "<USED_ID>",
        "locale": "en-US"
      },
      "conversation": {
        "conversationId": "1504592665563",
        "type": "ACTIVE",
        "conversationToken": "[\"defaultwelcomeintent-followup\"]"
      },
      "inputs": [
        {
          "intent": "actions.intent.PERMISSION",
          "rawInputs": [
            {
              "inputType": "VOICE",
              "query": "yes"
            }
          ],
          "arguments": [
            {
              "name": "PERMISSION",
              "textValue": "true"
            }
          ]
        }
      ],
      "surface": {
        "capabilities": [
          {
            "name": "actions.capability.AUDIO_OUTPUT"
          },
          {
            "name": "actions.capability.SCREEN_OUTPUT"
          }
        ]
      },
      "device": {
        "location": {
          "coordinates": {
            "latitude": 37.4219806,
            "longitude": -122.0841979
          }
        }
      },
      "isInSandbox": true
    }
  },
  "agentToAssistantDebug": {
    "agentToAssistantJson": {
      "message": "Unexpected apiai response format: Empty speech response",
      "apiResponse": {
        "id": "<ID>",
        "timestamp": "2017-09-05T06:24:41.711Z",
        "lang": "en",
        "result": {},
        "status": {
          "code": 200,
          "errorType": "success"
        },
        "sessionId": "1504592665563"
      }
    }
  },
  "sharedDebugInfo": [
    {
      "name": "GOOGLE_SYSTEM_ACTION",
      "debugInfo": "Your query was handled by Actions on Google."
    },
    {
      "name": "GOOGLE_SYSTEM_ACTION",
      "debugInfo": "Your query was handled by Actions on Google."
    },
    {
      "name": "ResponseValidation",
      "subDebugEntry": [
        {
          "name": "UnparseableJsonResponse",
          "debugInfo": "API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: \": Cannot find field.\"."
        }
      ]
    }
  ]
}
{
“assistantToAgentDebug”:{
“curlCommand:“curl-v”{\“user\”:{“userId\”:“\”,“locale\”:“en-US\”,“conversation\”:{“conversationId\”:“1504592665563\”,“type\”:“ACTIVE\”,“conversationToken\”:“[\\\\\“defaultwelcomeintent followup\\”],“inputs\”:[{\“intent\”:“actions.intent.PERMISSION\”,“rawInputs\”:“[“inputs\”,“:”,“,“:”,“语音输入”,“:”,“[\\”,“,“:”,“[\\\”,“,”,”,“[\\\”,“\”,[\\\\”,“\”,[\\”,“名称\“:\”权限\“,\”文本值\“:\”真实\“}],\”表面\“:{”能力\“:[{\”名称\“:\”动作.能力.音频输出\“},{\”名称\“:\”动作.能力.屏幕输出\“},\”设备\“:{”位置\“:{”坐标\“:{”纬度\“:37.4219806,\“经度\“:-122.0841979},\”isInSandbox \“:”真实},
“assistantToAgentJson”:{
“用户”:{
“用户ID”:“,
“locale”:“en-US”
},
“对话”:{
“会话ID”:“1504592665563”,
“类型”:“活动”,
“conversationToken”:“[\”defaultwelcomeintent followup\”]
},
“投入”:[
{
“意图”:“actions.intent.PERMISSION”,
“原始输入”:[
{
“输入类型”:“语音”,
“查询”:“是”
}
],
“论点”:[
{
“名称”:“权限”,
“textValue”:“true”
}
]
}
],
“表面”:{
“能力”:[
{
“名称”:“操作.功能.音频输出”
},
{
“名称”:“操作.功能.屏幕输出”
}
]
},
“设备”:{
“地点”:{
“坐标”:{
“纬度”:37.4219806,
“经度”:-122.0841979
}
}
},
“isInSandbox”:正确
}
},
“AgentAssistantDebug”:{
“AgentAssistantJSON”:{
“消息”:“意外apiai响应格式:空语音响应”,
“回应”:{
“id”:“,
“时间戳”:“2017-09-05T06:24:41.711Z”,
“郎”:“恩”,
“结果”:{},
“地位”:{
“代码”:200,
“errorType”:“成功”
},
“sessionId”:“1504592665563”
}
}
},
“sharedDebugInfo”:[
{
“名称”:“谷歌系统行动”,
“debugInfo”:“您的查询由Google上的操作处理。”
},
{
“名称”:“谷歌系统行动”,
“debugInfo”:“您的查询由Google上的操作处理。”
},
{
“名称”:“响应回避”,
“子调试项”:[
{
“名称”:“UnparseableJsonResponse”,
“debugInfo”:“API版本2:无法解析JSON响应字符串,错误为“INVALID\u ARGUMENT:\”:找不到字段。\”
}
]
}
]
}
使用Python库

我如何解决这个问题

更新 节点JS客户端工作。。。Python客户端有什么问题

操作控制台调试响应

{
  "assistantToAgentDebug": {
    "curlCommand": "curl -v '<URL>'{\"user\":{\"userId\":\"<USER_ID>\",\"locale\":\"en-US\"},\"conversation\":{\"conversationId\":\"<ID>\",\"type\":\"ACTIVE\",\"conversationToken\":\"[\\\"_actions_on_google_\\\",\\\"defaultwelcomeintent-followup\\\"]\"},\"inputs\":[{\"intent\":\"actions.intent.PERMISSION\",\"rawInputs\":[{\"inputType\":\"VOICE\",\"query\":\"yes\"}],\"arguments\":[{\"name\":\"PERMISSION\",\"textValue\":\"true\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"}]},\"device\":{\"location\":{\"coordinates\":{\"latitude\":37.4219806,\"longitude\":-122.0841979},\"formattedAddress\":\"Googleplex, Mountain View, CA 94043, United States\",\"zipCode\":\"94043\",\"city\":\"Mountain View\"}},\"isInSandbox\":true}'",
    "assistantToAgentJson": {
      "user": {
        "userId": "<USER_ID>",
        "locale": "en-US"
      },
      "conversation": {
        "conversationId": "<ID>",
        "type": "ACTIVE",
        "conversationToken": "[\"_actions_on_google_\",\"defaultwelcomeintent-followup\"]"
      },
      "inputs": [
        {
          "intent": "actions.intent.PERMISSION",
          "rawInputs": [
            {
              "inputType": "VOICE",
              "query": "yes"
            }
          ],
          "arguments": [
            {
              "name": "PERMISSION",
              "textValue": "true"
            }
          ]
        }
      ],
      "surface": {
        "capabilities": [
          {
            "name": "actions.capability.AUDIO_OUTPUT"
          }
        ]
      },
      "device": {
        "location": {
          "coordinates": {
            "latitude": 37.4219806,
            "longitude": -122.0841979
          },
          "formattedAddress": "Googleplex, Mountain View, CA 94043, United States",
          "zipCode": "94043",
          "city": "Mountain View"
        }
      },
      "isInSandbox": true
    }
  },
  "agentToAssistantDebug": {
    "agentToAssistantJson": {
      "conversationToken": "[\"_actions_on_google_\",\"defaultwelcomeintent-followup\"]",
      "expectUserResponse": true,
      "expectedInputs": [
        {
          "inputPrompt": {
            "richInitialPrompt": {
              "items": [
                {
                  "simpleResponse": {
                    "textToSpeech": "Given permission"
                  }
                }
              ]
            }
          },
          "possibleIntents": [
            {
              "intent": "assistant.intent.action.TEXT"
            }
          ]
        }
      ],
      "responseMetadata": {
        "status": {
          "code": 14
        },
        "queryMatchInfo": {
          "queryMatched": true,
          "intent": "Default Welcome Intent - fallback"
        }
      }
    }
  }
}
{
“assistantToAgentDebug”:{
“curlCommand”:“curl-v”{\“user\”:{“userId\”:“\”,“locale\”:“en-US\”,“conversation\”:{“conversationId\”:“\”,\“type\”:“ACTIVE\”,“conversationToken\”:“[\\\\\\\”\u谷歌上的操作”,\\\\\\\\\“defaultwelcomeintent后续跟进”\\\”,“inputs\”,“:[{\\”,“inputs\”:“[\\”:“[\\\\\”:”:“意图”:“操作.意图.权限”,“输入”:“[\\”,“:”,“[\\\\”,“:“语音查询”,“\\”,[\\”,[\\”,“\\\\\”参数\“:[{”名称\“:\”权限\“,\”文本值\“:\”真实\“}],\”表面\“:{”能力\“:[{”名称\“:\”动作.能力.音频输出\“}],”设备\“:{”位置\“:{”坐标\“:{”纬度\“:37.4219806,\”经度\“:-122.0841979},\”格式化地址\“:”谷歌广场,美国加利福尼亚州山景城94043,“:”zipCode\:“城市\”山景\“},\“isInSandbox\”:true}',
“assistantToAgentJson”:{
“用户”:{
“用户ID”:“,
“locale”:“en-US”
},
“对话”:{
“会话ID”:“,
“类型”:“活动”,
“conversationToken”:“[\”\u谷歌上的操作“,\“defaultwelcomeintent followup\”]
},
“投入”:[
{
“意图”:“actions.intent.PERMISSION”,
“原始输入”:[
{
“输入类型”:“语音”,
“查询”:“是”
}
],
“论点”:[
{
“名称”:“权限”,
“textValue”:“true”
}
]
}
],
“表面”:{
“能力”:[
{
“名称”:“操作.功能.音频输出”
}
]
},
“设备”:{
“地点”:{
“坐标”:{
“纬度”:37.4219806,
“经度”:-122.0841979
},
“格式化地址”:“谷歌广场,美国加利福尼亚州山景城94043号”,
“zipCode”:“94043”,
“城市”:“山景”
}
},
“isInSandbox”:正确
}
},
“AgentAssistantDebug”:{
“AgentAssistantJSON”:{
“conversationToken”:“[\”\u谷歌上的操作“,\“defaultwelcomeintent followup\”],
“expectUserResponse”:正确,
“预期看跌期权”:[
{
“输入提示”:{
“richInitialPrompt”:{
“项目”:[
{
“简单响应”:{
“textToSpeech”:“已授予权限”
}
}
]
}
},
“可能的内容”:[
{
“意图”:“助手.意图.动作.文本”
}
]
}
],
{ originalRequest: 
   { source: 'google',
     version: '2',
     data: 
      { isInSandbox: true,
        surface: [Object],
        inputs: [Array],
        user: [Object],
        device: [Object],
        conversation: [Object] } },
  id: '<ID>',
  timestamp: '2017-09-06T05:43:21.342Z',
  lang: 'en',
  result: 
   { source: 'agent',
     resolvedQuery: 'actions_intent_PERMISSION',
     speech: '',
     action: 'DefaultWelcomeIntent.DefaultWelcomeIntent-fallback',
     actionIncomplete: false,
     parameters: {},
     contexts: [ [Object], [Object], [Object], [Object], [Object] ],
     metadata: 
      { intentId: '<ID>',
        webhookUsed: 'true',
        webhookForSlotFillingUsed: 'false',
        nluResponseTime: 2,
        intentName: 'Default Welcome Intent - fallback' },
     fulfillment: { speech: 'Given permission', messages: [Array] },
     score: 1 },
  status: { code: 200, errorType: 'success' },
  sessionId: '<SID>' 
  }