bae的CLI 无法登录成功,怎么回事
mss 发布于2016-11-19 12:07 浏览:974 回复:2
0
收藏

环境:

Linux ubuntu 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Python 2.7.6

bae -v

bae 2.0.9

描述:

bae -D  login,输入正确的AK、SK后,

send: 'GET / HTTP/1.1\r\nHost: cli.bae.baidu.com\r\nConnection: keep-alive\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nUser-Agent: python-requests/2.12.1\r\n\r\n'

reply: 'HTTP/1.1 403 Forbidden\r\n'

header: x-bce-request-id: bc5fb4ea-be43-4b3b-abdf-a5d26e2f2d65

header: Content-Type: application/json;charset=UTF-8

header: Transfer-Encoding: chunked

header: Date: Sat, 19 Nov 2016 03:50:16 GMT

header: Server: BWS

send: 'POST /api/bae/app/getVersionInfo HTTP/1.1\r\nHost: cli.bae.baidu.com\r\nAccept-Encoding: identity\r\nContent-Length: 20\r\nX-Bce-Service-Id: bae.bj.baidubce.com\r\nAccept: application/json\r\nUser-Agent: BAE CLI 2.0.9 "Linux-3.19.0-25-generic-x86_64-with-Ubuntu-14.04-trusty #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015"\r\nContent-Type: application/json\r\nxxxx{"tool_name": "cli"}'

reply: 'HTTP/1.1 505 HTTP Version Not Supported\r\n'

header: x-bce-request-id: 85c7ab97-16f9-47e3-9e41-c1a7a0ea35ee

header: Content-Type: text/html;charset=UTF-8

header: Content-Length: 379

header: Date: Sat, 19 Nov 2016 03:50:17 GMT

header: Server: BWS

<<  Server returns <?xml version="1.0" encoding="iso-8859-1"?>

<<  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<<           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<<  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<<   <head>

<<    <title>505 - HTTP Version Not Supported</title>

<<   </head>

<<   <body>

<<    <h1>505 - HTTP Version Not Supported</h1>

<<   </body>

<<  </html>

<<  Traceback (most recent call last):

<<    File "/usr/local/lib/python2.7/dist-packages/bae/rest/rest.py", line 129, in _request

<<      obj = json.loads(res.text)

<<    File "/usr/lib/python2.7/json/__init__.py", line 338, in loads

<<      return _default_decoder.decode(s)

<<    File "/usr/lib/python2.7/json/decoder.py", line 366, in decode

<<      obj, end = self.raw_decode(s, idx=_w(s, 0).end())

<<    File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode

<<      raise ValueError("No JSON object could be decoded")

<<  ValueError: No JSON object could be decoded

Can't understand servers infomation <?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

 <head>

  <title>505 - HTTP Version Not Supported</title>

 </head>

 <body>

  <h1>505 - HTTP Version Not Supported</h1>

 </body>

</html>


<<  AK/SK is invalid Can't understand servers infomation <?xml version="1.0" encoding="iso-8859-1"?>

<<  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<<           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<<  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<<   <head>

<<    <title>505 - HTTP Version Not Supported</title>

<<   </head>

<<   <body>

<<    <h1>505 - HTTP Version Not Supported</h1>

<<   </body>

<<  </html>


收藏
点赞
0
个赞
共2条回复 最后由城市森林回复于2016-12-10 20:42
#2hahahaha回复于2016-11-27

我也遇到了同样的问题,楼上你的解决了吗?????

0
#3城市森林回复于2016-12-10

同问

0
TOP