Skip to content

disconf api的问题 #1

@jinyuchen724

Description

@jinyuchen724

我在调用api的时候按照这个方式去调用报了以下错误,能帮忙看看什么原因吗?
dapi.web_config_download_148.get()

send: 'GET /api/web/config/download/148 HTTP/1.1\r\nAccept-Encoding: identity\r\nContent-Length: 38\r\nConnection: close\r\nUser-Agent: DisconfAPI\r\nHost: 172.16.8.42:8081\r\nCookie: JSESSIONID=E61127ECE3081895B88D4A24A3D6B2C5\r\nContent-Type: multipart/form-data; boundary=e57d53f8244f44429f12c38350e72d6f\r\n\r\n'
send: <poster.encode.multipart_yielder instance at 0x186ee18>
sendIng an iterable
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Tue, 19 Jun 2018 03:33:50 GMT
header: Content-Type: application/octet-stream;charset=UTF-8
header: Content-Length: 15
header: Connection: close
header: Server: Apache-Coyote/1.1
header: Set-Cookie: DISCONF=e308698d-1c4f-4917-9a66-42e63134743a; Domain=disconf.com; Expires=Wed, 19-Jun-2019 03:33:50 GMT; Path=/
header: Content-Disposition: attachment; filename=autoconfig.properties
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib64/python2.7/site-packages/DisconfPythonAPI/dapi.py", line 184, in func
return self.proxy_api(method=method, **params)
File "/usr/lib64/python2.7/site-packages/DisconfPythonAPI/dapi.py", line 152, in ret
return func(self, *args, **params)
File "/usr/lib64/python2.7/site-packages/DisconfPythonAPI/dapi.py", line 159, in wrapper
return self.url_request(method=method, **params)
File "/usr/lib64/python2.7/site-packages/DisconfPythonAPI/dapi.py", line 190, in url_request
api=self.__api, method=method, **params)
File "/usr/lib64/python2.7/site-packages/DisconfPythonAPI/dapi.py", line 139, in url_request
content = json.loads(opener.read())
File "/usr/lib64/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions