Open eliomain opened 4 years ago
1.No module named 'requests' 是缺少了requests依赖包 可以去pip下载一下依赖包 2.时间戳本地跑的话可以用获取服务器时间戳接口去进行调试 看下是否有问题 API用户问题请加微信:ApiSupport 备注账号+姓名 拉您进官方api技术交流群 群里可得到更快速的回答
For python 3 need this fix at file utils.py
def get_timestamp(): now = datetime.datetime.utcnow() iso_format = '%Y-%m-%dT%H:%M:%S' t=now.strftime(iso_format) return t + "Z"
我加了UTF8 依然还是各种报错....
[root@izt4nf41cvya1mzsrupx5pz okex-python-sdk-api]# python3 example.py Traceback (most recent call last): File "example.py", line 2, in
import okex.account_api as account
File "/home/python/okex-python-sdk-api/okex/account_api.py", line 2, in
from .client import Client
File "/home/python/okex-python-sdk-api/okex/client.py", line 2, in
import requests
ModuleNotFoundError: No module named 'requests'
[root@izt4nf41cvya1mzsrupx5pz okex-python-sdk-api]# python example.py
Traceback (most recent call last):
File "example.py", line 29, in
time = get_timestamp()
File "example.py", line 25, in get_timestamp
t = now.isoformat("T", "milliseconds")
TypeError: isoformat() takes at most 1 argument (2 given)
[root@izt4nf41cvya1mzsrupx5pz okex-python-sdk-api]#