steem-python icon indicating copy to clipboard operation
steem-python copied to clipboard

TypeError while creating Steem object

Open AmoghSubhedar opened this issue 7 years ago • 4 comments

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.

AmoghSubhedar avatar Apr 26 '18 07:04 AmoghSubhedar

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.

mtastafford avatar May 02 '18 01:05 mtastafford

@AmoghSubhedar @mtastafford could you provide a full bug report, including:

  1. Version of Python you are running
  2. Version of steem-python you are running
  3. Expected Behavior
  4. Actual Behavior
  5. Steps to reproduce
  6. Stack Trace

steem-python is currently undergoing a significant face-lift, we'll address these issues asap.

cyon1c avatar May 02 '18 19:05 cyon1c

  1. Python 3.5.2
  2. Not sure, but I remember updating it last week, when I first encountered this issue.
  3. Should just create a Steem object and no error should be thrown
  4. Throws a TypeError
  5. 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

AmoghSubhedar avatar May 04 '18 16:05 AmoghSubhedar

  1. Python 3.6.5;
  2. steempy 1.0.0 & steem-python v '0.18.103';
  3. Just about anything. Can't do much of anything. Not very helpful. Crashes on line "s = Steem()";
  4. "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
>>> 

mtastafford avatar May 13 '18 04:05 mtastafford