python delete_python 使用 delete 方法时报错,可以正常删除

testcase/test_organization.py:34 (TestOrganization.test_delete)

self =

def test_delete(self):

print(self.organization.delete(119))

test_organization.py:36:

…/api/organization.py:59: in delete

return self.send(data)

…/api/base_api.py:14: in send

return requests.request(**data).json()

…/env/lib/python3.7/site-packages/requests/models.py:898: in json

return complexjson.loads(self.text, **kwargs)

…/env/lib/python3.7/site-packages/simplejson/init.py:525: in loads

return _default_decoder.decode(s)

…/env/lib/python3.7/site-packages/simplejson/decoder.py:370: in decode

obj, end = self.raw_decode(s)

self = , s = ‘’

idx = 0, _w =

_PY3 = True

def raw_decode(self, s, idx=0, _w=WHITESPACE.match, _PY3=PY3):

"""Decode a JSON document from s (a str or unicode

beginning with a JSON document) and return a 2-tuple of the Python

representation and the index in s where the document ended.

Optionally, idx can be used to specify an offset in s where

the JSON document begins.

This can be used to decode a JSON document from a string that may

have extraneous data at the end.

"""

if idx < 0:

# Ensure that raw_decode bails on negative indexes, the regex

# would otherwise mask this behavior. #98

raise JSONDecodeError('Expecting value', s, idx)

if _PY3 and not isinstance(s, str):

raise TypeError("Input string must be text, not bytes")

# strip UTF-8 bom

if len(s) > idx:

ord0 = ord(s[idx])

if ord0 == 0xfeff:

idx += 1

elif ord0 == 0xef and s[idx:idx + 3] == '\xef\xbb\xbf':

idx += 3

return self.scan_once(s, idx=_w(s, idx).end())

E simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

…/env/lib/python3.7/site-packages/simplejson/decoder.py:400: JSONDecodeError

Assertion failed

Assertion failed

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值