doulan4939 2016-03-22 15:25
浏览 49
已采纳

从GAE API使用endpointscfg生成Java客户端库时出现HTTP 500错误

I tried to generate java client library using a discovery doc retrieved from my API endpoints (which is running on golang) but failed wit the following message.

endpointscfg.py gen_client_lib java happylaundry.rest.discovery

Traceback (most recent call last):
  File "//Users/lorenz/go/go_appengine/endpointscfg.py", line 133, in <module>
    run_file(__file__, globals())
  File "//Users/lorenz/go/go_appengine/endpointscfg.py", line 129, in run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 561, in <module>
    main(sys.argv)
  File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 557, in main
    args.callback(args)
  File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 458, in _GenClientLibCallback
    args.build_system)
  File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 335, in _GenClientLib
    build_system, client_name)
  File "/Users/lorenz/go/go_appengine/google/appengine/tools/endpointscfg.py", line 366, in _GenClientLibFromContents
    raise ServerRequestException(error)
__main__.ServerRequestException: HTTP 500 (Internal Server Error) error when communicating with URL: https://google-api-client-libraries.appspot.com/generate. Response: 

I tried to use the same command and generated for a very simple program, and it runs without errro. From the syntax or structure of the discovery doc, i can't see anything ran wrong. Do you guys have any idea?

  • 写回答

1条回答 默认 最新

  • duancan1732 2016-03-26 18:14
    关注

    I remove this part from "schema" section from the discovery document, and it works.

    "Order": { "id": "Order", "type": "object", "properties": { "addressArea": { "type": "string" }, "addressDistrict": { "type": "string" }, "addressField1": { "type": "string" }, "addressField2": { "type": "string" }, "addressField3": { "type": "string" }, "addressField4": { "type": "string" }, "amountPayable": { "type": "integer", "format": "int32" }, "completed": { "type": "boolean" }, "createdAt": { "type": "string", "format": "date-time" }, "deliveryDate": { "type": "string", "format": "date-time" }, "deliveryTimeslot": { "type": "integer", "format": "int32" }, "id": { "type": "string" }, "pickupDate": { "type": "string", "format": "date-time" }, "pickupDeliveryInstruction": { "type": "string" }, "pickupTimeslot": { "type": "integer", "format": "int32" }, "referenceNumber": { "type": "string" }, "status": { "type": "integer", "format": "int32" }, "-": { "type": "string" } } },

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集