小编jam*_*son的帖子

故障排除引发TypeError(“ quote_from_bytes()预期字节”)

以下代码段引发了错误

    def __to_canonical_querystring_post(self, params):
    canonical_querystring = ""
    # parameters have to be sorted alphabetically for the signing part
    for param_key, param_value in sorted(params.items()):
        if canonical_querystring != "":
            canonical_querystring += "&"
        canonical_querystring += param_key + "=" + urllib.parse.quote(param_value)
    return canonical_querystring
Run Code Online (Sandbox Code Playgroud)

参数为Make_Payment_params = {“ debitAccountNumber”:12003189487,“ creditAccountNumber”:12065812627,“ amount”:100,“ requestedExecutionDate”:“ 2019-03-09”}

并引发错误TypeError(“ quote_from_bytes()预期字节”)TypeError:quote_from_bytes()预期字节

非常感谢帮助

python rest web

0
推荐指数
1
解决办法
1600
查看次数

标签 统计

python ×1

rest ×1

web ×1