3.86K 浏览
0

使用自己注册账号不能登录,使用官网提供的例程账号密码也是无法登录。这个功能是否可以正常使用??

leptonlee9999 发表新评论 2020年7月1日

C:UsersleptoPycharmProjectsuntitledvenvScriptspython.exe D:/Python37/test20626.py
在使用天勤量化之前,默认您已经知晓并同意以下免责条款,如果不同意请立即停止使用:https://www.shinnytech.com/blog/disclaimer/
Traceback (most recent call last):
File “D:/Python37/test20626.py”, line 23, in
api = TqApi(TqKq(), auth=”tianqin@163.com,tianqin”)
File “C:UsersleptoPycharmProjectsuntitledvenvlibsite-packagestqsdkapi.py”, line 220, in __init__
self._setup_connection() # 初始化通讯连接
File “C:UsersleptoPycharmProjectsuntitledvenvlibsite-packagestqsdkapi.py”, line 1180, in _setup_connection
self._auth_account() # 支持用户授权
File “C:UsersleptoPycharmProjectsuntitledvenvlibsite-packagestqsdkapi.py”, line 1157, in _auth_account
raise Exception(“用户权限认证失败 (%d,%s)” % (response.status_code, response.content))
Exception: 用户权限认证失败 (401,b'{“error”:”invalid_grant”,”error_description”:”Invalid user credentials”}’)
Task was destroyed but it is pending!
task: <Task pending coro= cb=[TqApi._on_task_done()]>
Task was destroyed but it is pending!
task: <Task pending coro= cb=[TqApi._on_task_done()]>
sys:1: RuntimeWarning: coroutine ‘TqApi._windows_patch’ was never awaited
sys:1: RuntimeWarning: coroutine ‘TqApi._notify_watcher’ was never awaited

Process finished with exit code 1

就是直接复制的例程,还是登录不了

0

可以使用,报错截全,如果你这个账户能登录论坛就一定能使用TqKq进行登录

注意auth=”论坛账户,论坛密码” 中的,是英文格式 同时后面没空格

ringo 已回答的问题 2020年7月1日