Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding was remove in python 3.9 #137

Open
thaob1d6 opened this issue Sep 23, 2022 · 2 comments
Open

encoding was remove in python 3.9 #137

thaob1d6 opened this issue Sep 23, 2022 · 2 comments

Comments

@thaob1d6
Copy link

thaob1d6 commented Sep 23, 2022

I use python 3.10, what should I do to use API sdk?
`

from huobi.client.account import AccountClient
from huobi.constant import *
from huobi.utils import LogInfo

account_client = AccountClient(api_key=g_api_key,
secret_key=g_secret_key)
LogInfo.output("====== (SDK encapsulated api) not recommend for low performance and frequence limitation ======")
account_balance_list = account_client.get_account_balance()
if account_balance_list and len(account_balance_list):
for account_obj in account_balance_list:
account_obj.print_object()
print()

`
Some error comeup
TypeError: JSONDecoder.init() got an unexpected keyword argument 'encoding'

@nisnevich
Copy link

Still not fixed.

@sharpe5
Copy link

sharpe5 commented May 6, 2024

Same issue here. This repo is completely broken if anybody uses Python 3.10 or above.

Python 3.10 was released over 3 years ago! I’m using Python 3.11.

It’s not a difficult fix:

venv/lib/python3.11/site-packages/huobi/connection/impl/restapi_invoker.py >> call_sync():

dict_data = json.loads(response.text)  # Remove parameter ‘encoding’, similarly for all other json.loads() calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants