huobi_Python
huobi_Python copied to clipboard
由於python 3.9 json的变更,部分代码会报错
return cls(**kw).decode(s)
TypeError: init() got an unexpected keyword argument 'encoding'
暂时解决方法: site-packages\huobi\connection\impl\restapi_invoker.py", line 56, in call_sync dict_data = json.loads(response.text, encoding="utf-8")
在报错的代码中把代码里面的encoding删除:dict_data = json.loads(response.text)
求完美解决方法...毕竟一句句删不实际啊
同样的bug The same bug
https://github.com/HuobiRDCenter/huobi_Python/blob/v2.3.0/huobi/connection/impl/restapi_invoker.py#L56
dict_data = json.loads(response.text, encoding="utf-8")
https://docs.python.org/3.8/library/json.html#json.loads
Deprecated since version 3.1, will be removed in version 3.9: encoding keyword argument
同样的bug The same bug
https://github.com/HuobiRDCenter/huobi_Python/blob/v2.3.0/huobi/connection/impl/restapi_invoker.py#L56
dict_data = json.loads(response.text, encoding="utf-8")
https://docs.python.org/3.8/library/json.html#json.loads
Deprecated since version 3.1, will be removed in version 3.9: encoding keyword argument
对啊,原因就是json不再需要encoding了,导致新旧代码不兼容...我脑袋不行,得要个解决方法...