steem-python
steem-python copied to clipboard
TypeError while creating Steem object
When I am creating a Steem object, I get this error:
s = Steem(nodes=nds,no_broadcast=False, keys=['5Ui'])
File "/home/ubuntu/.local/lib/python3.5/site-packages/steem/steem.py", line 60, in __init__
steemd_instance=self.steemd, no_broadcast=no_broadcast, **kwargs)
File "/home/ubuntu/.local/lib/python3.5/site-packages/steem/commit.py", line 96, in __init__
self.wallet = Wallet(self.steemd, **kwargs)
File "/home/ubuntu/.local/lib/python3.5/site-packages/steem/wallet.py", line 61, in __init__
self.prefix = self.steemd.chain_params["prefix"]
File "/home/ubuntu/.local/lib/python3.5/site-packages/steem/steemd.py", line 70, in chain_params
chain = props["current_supply"].split(" ")[1]
TypeError: 'NoneType' object is not subscriptable
I've been using the same statement for creating Steem objects before and it used to work fine. This has only been a recent problem.
It looks like this just started happening for me as well -- not sure what the issue is. Occurs when calling any steempy commands (eg. "steempy listaccounts") as well.
@AmoghSubhedar @mtastafford could you provide a full bug report, including:
- Version of Python you are running
- Version of steem-python you are running
- Expected Behavior
- Actual Behavior
- Steps to reproduce
- Stack Trace
steem-python is currently undergoing a significant face-lift, we'll address these issues asap.
- Python 3.5.2
- Not sure, but I remember updating it last week, when I first encountered this issue.
- Should just create a Steem object and no error should be thrown
- Throws a TypeError
- s = Steem()
Traceback:
s = Steem(nodes=nds,no_broadcast=False, keys=['5Ui']) File "/home/ubuntu/.local/lib/python3.5/site-packages/steem/steem.py", line 60, in __init__ steemd_instance=self.steemd, no_broadcast=no_broadcast, **kwargs) File "/home/ubuntu/.local/lib/python3.5/site-packages/steem/commit.py", line 96, in __init__ self.wallet = Wallet(self.steemd, **kwargs) File "/home/ubuntu/.local/lib/python3.5/site-packages/steem/wallet.py", line 61, in __init__ self.prefix = self.steemd.chain_params["prefix"] File "/home/ubuntu/.local/lib/python3.5/site-packages/steem/steemd.py", line 70, in chain_params chain = props["current_supply"].split(" ")[1] TypeError: 'NoneType' object is not subscriptable
- Python 3.6.5;
- steempy 1.0.0 & steem-python v '0.18.103';
- Just about anything. Can't do much of anything. Not very helpful. Crashes on line "s = Steem()";
- "steempy set nodes https://rpc.steemviz.com";
>>> s = Steem()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mark/steem/lib64/python3.6/site-packages/steem/steem.py", line 60, in __init__
steemd_instance=self.steemd, no_broadcast=no_broadcast, **kwargs)
File "/home/mark/steem/lib64/python3.6/site-packages/steem/commit.py", line 96, in __init__
self.wallet = Wallet(self.steemd, **kwargs)
File "/home/mark/steem/lib64/python3.6/site-packages/steem/wallet.py", line 61, in __init__
self.prefix = self.steemd.chain_params["prefix"]
File "/home/mark/steem/lib64/python3.6/site-packages/steem/steemd.py", line 70, in chain_params
chain = props["current_supply"].split(" ")[1]
TypeError: 'NoneType' object is not subscriptable
>>>