Steem Python升级过程中遇到的坑
最近看了O哥的文章,头脑一热,想着趁着今天有点空,干脆把Steem Python给升级了吧。
升级本身就需一个命令
pip3 install steem --upgrade
于是满心期待着试着运行了一下,得到的却是这样一个错误:
WARNING:root:Retry in 1s -- RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
这才想起来,这两天节点不稳定,于是在各个节点间切换,似乎切换到了rpc.steemviz.com,于是所有用steem python写的程序都不能跑了。。。
首先想到的就是要恢复官方节点:
steempy set nodes https://api.steemit.com
看到的却是同样的错误信息。。。
好吧,那怎么改默认节点信息?记得似乎Steem Python把节点信息存在一个sqlite3的数据库中,但死活就是找不到那个文件。。。
那就改下这个文件吧:/home/yuxi/environments/myenv/lib/python3.5/site-packages/steembase/http_client.py
找到这行:
self.nodes = cycle(self.sanitize_nodes(nodes))
将它注释掉,再加上这行:
self.nodes = cycle(self.sanitize_nodes(['https://api.steemit.com']))
似乎程序可以跑了。赶紧更换节点:
steempy set nodes https://api.steemit.com
再把程序改回原来版本,一切正常。
坑到此结束?NONONO,旧版本中的有些方法似乎不能用了,一点点接着去填吧。。。
提醒大家,进行这个操作前,一定先要做个snapshot,以便随时可以复原。
这只是我个人的经历,升级出了问题不要找我。。。
谢谢 提醒
不客气
你今天过的开心吗?新人吗?《steemit指南》拿一份吧,以免迷路; 另外一定要去 @team-cn 的新手村看看,超级热闹的大家庭。假如我的留言打扰到你,请回复“取消”。
感谢分享!
Posted using Partiko Android
也给自己记录一下,以免忘掉 :-)
哈哈,我都不敢升级的
目前为止,只遇到两处接口不匹配的地方,升级基本成功
Congratulations @yuxi! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of upvotes
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP
@yuxi :D Thank you so much for upvoted my blog I really appreciated!
Happy, peaceful and lovely weekend! :D
Your friend @supernona55 I had followed you :D
Congratulations @yuxi! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Award for the number of upvotes
Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard:
Congratulations @yuxi! You have received a personal award!
2 Years on Steemit
Click on the badge to view your Board of Honor.
Do not miss the last post from @steemitboard: