steemit / steem-python

The official Python (3) library for the Steem Blockchain.
https://steem.io
MIT License
153 stars 99 forks source link

Cast Error when trying to perform a transfer. #191

Closed maxpatternman closed 6 years ago

maxpatternman commented 6 years ago

Hi, I got an error while trying to transfer SBD or STEEM. The error occurs directly in Python and with Steempy.

I'm using Python 3.4.6


steempy transfer maxpatternman 0.001 SBD

and

s.commit.transfer('maxpatternman', 0.001, 'SBD') Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.6/site-packages/steem-0.18.3-py3.6.egg/steem/commit.py", line 675, in transfer File "/usr/local/lib/python3.6/site-packages/steem-0.18.3-py3.6.egg/steem/commit.py", line 134, in finalizeOp File "/usr/local/lib/python3.6/site-packages/steem-0.18.3-py3.6.egg/steem/transactionbuilder.py", line 139, in broadcast File "/usr/local/lib/python3.6/site-packages/steem-0.18.3-py3.6.egg/steem/transactionbuilder.py", line 136, in broadcast File "/usr/local/lib/python3.6/site-packages/steem-0.18.3-py3.6.egg/steem/steemd.py", line 754, in verify_authority File "/usr/local/lib/python3.6/site-packages/steem-0.18.3-py3.6.egg/steembase/http_client.py", line 243, in call File "/usr/local/lib/python3.6/site-packages/steem-0.18.3-py3.6.egg/steembase/http_client.py", line 263, in _return steembase.exceptions.RPCError: Bad Cast:Invalid cast from string_type to Array

bobinson commented 6 years ago
  1. Check whether the nodes are accessible
  2. steembase.exceptions.RPCError: Bad Cast:Invalid cast from string_type to Array If we can learn more about the above error, that may help to address the issue. ie, try to get the exact exception that happened here

SmokinCaterpillar commented 6 years ago

I have the very same issue, it started from one day to the next without changing my code. By the way the nodes are available, everything except transfers works.

SmokinCaterpillar commented 6 years ago

Well, to be precise, claiming of rewards doesn't work either, but this is kind of a transfer, too, I guess.

officiallymarky commented 6 years ago

Try using a node that isn't api.steemit.com

maxpatternman commented 6 years ago

Thank you @themarkymark-steem . Another node solved the problem. So the problem is due to the change from api.steemit.com. @cyon1c Should I close the ticket?

officiallymarky commented 6 years ago

Yes it is. Api is running AppBase. Good to know right?

I recommend using ‘steempy set nodes node1,node2,node3’

Instead of setting it in scripts. Allows you to globally correct these issues

SmokinCaterpillar commented 6 years ago

Finally using https://rpc.buildteam.io as a node, it worked, thanks :-)

maxpatternman commented 6 years ago

@themarkymark-steem All right. I have now included it in my initial BASH script. Thanks for the advice.

roadscape commented 6 years ago

These issues have been resolved, please try again using latest master.

chenlocus commented 6 years ago

This is happening again, when I transfer to account using: steempy transfer --account A B 1 STEEM memo It complains: Bad Cast:Invalid cast from string_type to Array.

There is another issue here, if I don't specify '--account A', it will ask me to specify, however, the from account should be optional according to the help.