【问题标题】:Can Amadeus flight delay prediction API being used in China?艾玛迪斯航班延误预测 API 能否在中国使用?
【发布时间】:2021-08-11 03:59:10
【问题描述】:

我使用航班延误预测 api 进行中国国内航班预测。 API 给出错误 500:内部服务器错误。 这是我的api文档网页和响应信息给出的api请求url。

谢谢! 廖晨

https://test.api.amadeus.com/v1/travel/predictions/flight-delay?originLocationCode=PKX&destinationLocationCode=KWE&departureDate=2021-08-11&departureTime=2021-08-11T15%3A15%3A00&arrivalDate=2021-08-11&arrivalTime=2021-08-11T18%3A15%3A00&aircraftCode=737&carrierCode=CZ&flightNumber=6188&duration=PT3H

{
  "errors": [
    {
      "code": 141,
      "detail": "ModelError: Received server error (500) from model with message \"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>500 Internal Server Error</title>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\n\". See https://eu-west-1.console.aws.amazon.com/cloudwatch/home?region=eu-west-1#logEventViewer:group=/aws/sagemaker/Endpoints/layla-all-v2 in account 740907634312 for more information.\n{\n  RespMetadata: {\n    StatusCode: 424,\n    RequestID: \"1cc2ca6d-59eb-494d-9a2c-f21c568c3346\"\n  },\n  LogStreamArn: \"arn:aws:logs:eu-west-1:740907634312:log-group:/aws/sagemaker/Endpoints/layla-all-v2\",\n  Message_: \"Received server error (500) from model with message \\\"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 3.2 Final//EN\\\">\\n<title>500 Internal Server Error</title>\\n<h1>Internal Server Error</h1>\\n<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\\n\\\". See https://eu-west-1.console.aws.amazon.com/cloudwatch/home?region=eu-west-1#logEventViewer:group=/aws/sagemaker/Endpoints/layla-all-v2 in account 740907634312 for more information.\",\n  OriginalMessage: \"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 3.2 Final//EN\\\">\\n<title>500 Internal Server Error</title>\\n<h1>Internal Server Error</h1>\\n<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>\\n\",\n  OriginalStatusCode: 500\n}",
      "status": 500,
      "title": "UNEXPECTED ERROR"
    }
  ]
}

【问题讨论】:

    标签: amadeus


    【解决方案1】:

    您请求中的出发和到达时间格式错误。根据documentation,它们必须采用 HH:mm:ss 格式。

    【讨论】:

    • 错误信息“旅行者从始发地到达目的地的日期。日期以 ISO 8601 YYYY-MM-DD 格式指定,例如 2019-12-25”来自我使用 HH:mm:ss fromat 的网页“developers.amadeus.com/self-service/category/air/api-doc/…”。
    • 但是在您上面的请求中,我看到departureTime=2021-08-11T15%3A15%3A00arrivalTime=2021-08-11T18%3A15%3A00,它不是HH:mm:ss 格式。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多