python - 如何连接到 Storj 个人资料?
问题描述
我的 Storj API 出现错误,我尝试使用 python 脚本验证我的个人资料,但每次我收到此错误:
\Python39\site-packages\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.storj.io', port=443): Max retries exceeded with url: /buckets (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000014C663D5E20>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))
官方网站是:https ://www.storj.io/ 这是我从这个网站使用的代码:https ://github.com/hwkns/storj-python-sdk
import storj
(private_key, public_key) = storj.generate_new_key_pair()
storj.authenticate(
email='sss',
password='sss'
)
storj.public_keys.add(public_key)
storj.authenticate(ecdsa_private_key=private_key)
key_list = storj.public_keys.all()
# Add a key
storj.public_keys.add(public_key)
bucket_list = storj.buckets.all()
print(bucket_list)
解决方案
推荐阅读
- php - 更改管理区域中 Woocommerce 变量产品的自定义字段顺序
- ms-access - 如何在 VBA 中向 MsgBox 添加字段名称
- signalr - 如何在多租户应用程序中定义 signalR MapHub 路由
- jquery - 在 MVC 中的 JQuery 中使用数据名时如何获取字符串值?
- haskell - 通过 SomeNat 上的模式匹配产生的类型变量的范围是什么?
- regex - 正则表达式隔离网址但不隔离电子邮件
- python - 如何在 Python 中查找 .txt 文件中的所有子字符串
- azure-application-insights - Application Insights:某些指标未通过,不确定如何响应错误消息
- jquery - 如何使用 jquery 在 lightgallery 中选择关闭图标?
- node.js - Heroku node_modules 未找到