create account

RE: Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database by zipsardinia

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @steempytutorials/part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database

· @zipsardinia · (edited)
$0.43
Hello Friend. I started the tutorial. I also imported my account, everything worked. Since I have steempy set nodes https://rpc.steemviz.com
How can I set the default node again? Thanks!
WARNING:root:Retry in 1s -- RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
WARNING:root:Retry in 2s -- RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
WARNING:root:Retry in 3s -- RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
.....
ERROR:root:Failed after 10 attempts -- RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
Traceback (most recent call last):
  File "/home/mfrau/anaconda3/bin/steempy", line 11, in "<"module">"
    sys.exit(legacyentry())
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/cli.py", line 776, in legacyentry
    steem = stm.Steem(no_broadcast=args.no_broadcast, **options)
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/steem.py", line 59, in __init__
    steemd_instance=self.steemd, no_broadcast=no_broadcast, **kwargs)
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/commit.py", line 96, in __init__
    self.wallet = Wallet(self.steemd, **kwargs)
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/wallet.py", line 61, in __init__
    self.prefix = self.steemd.chain_params["prefix"]
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/steemd.py", line 65, in chain_params
    props = self.get_dynamic_global_properties()
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steem/steemd.py", line 419, in get_dynamic_global_properties
    return self.call('get_dynamic_global_properties', api='database_api')
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steembase/http_client.py", line 288, in call
    raise e
  File "/home/mfrau/anaconda3/lib/python3.6/site-packages/steembase/http_client.py", line 246, in call
    % (response.status, self.hostname))
steembase.exceptions.RPCErrorRecoverable: non-200 response: 502 from rpc.steemviz.com
👍  , , , , , , , , , , , , , , ,
properties (23)
authorzipsardinia
permlinkre-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t084438558z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://rpc.steemviz.com"],"app":"steemit/0.1"}
created2018-07-07 08:44:39
last_update2018-07-07 08:47:09
depth1
children4
last_payout2018-07-14 08:44:39
cashout_time1969-12-31 23:59:59
total_payout_value0.334 HBD
curator_payout_value0.099 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,018
author_reputation5,608,798,363,039
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id63,755,810
net_rshares217,218,127,523
author_curate_reward""
vote details (16)
@juliank ·
You can manually set the nodes in the code as following:

>nodes = ['https://api.steemit.com',
                      'https://rpc.buildteam.io',
                      'https://rpc.steemviz.com']
   steem = Steem(nodes=self.nodes)
properties (22)
authorjuliank
permlinkre-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t093549155z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://api.steemit.com","https://rpc.buildteam.io","https://rpc.steemviz.com"],"app":"steemit/0.1"}
created2018-07-07 09:35:48
last_update2018-07-07 09:35:48
depth2
children2
last_payout2018-07-14 09:35:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length229
author_reputation117,823,071,447,502
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,760,036
net_rshares0
@zipsardinia ·
>>> nodes=['https://api.steemit.com']
>>> from steem import Steem
>>> steem = Steem(nodes=self.nodes)
Traceback (most recent call last):
  File "<"stdin">", line 1, in "<"module">"
NameError: name 'self' is not defined
properties (22)
authorzipsardinia
permlinkre-juliank-re-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t100252431z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://api.steemit.com"],"app":"steemit/0.1"}
created2018-07-07 10:02:54
last_update2018-07-07 10:02:54
depth3
children1
last_payout2018-07-14 10:02:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length218
author_reputation5,608,798,363,039
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id63,762,337
net_rshares0
@steempytutorials ·
$0.02
Sorry:

>nodes = ['https://api.steemit.com',
'https://rpc.buildteam.io',
'https://rpc.steemviz.com']
steem = Steem(nodes=nodes)

or within the class:

>self.nodes = ['https://api.steemit.com',
'https://rpc.buildteam.io',
'https://rpc.steemviz.com']
self.steem = Steem(nodes=self.nodes)
👍  
properties (23)
authorsteempytutorials
permlinkre-zipsardinia-re-juliank-re-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t105650923z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://api.steemit.com","https://rpc.buildteam.io","https://rpc.steemviz.com"],"app":"steemit/0.1"}
created2018-07-07 10:56:51
last_update2018-07-07 10:56:51
depth4
children0
last_payout2018-07-14 10:56:51
cashout_time1969-12-31 23:59:59
total_payout_value0.016 HBD
curator_payout_value0.005 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length285
author_reputation31,094,047,689,691
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id63,766,998
net_rshares11,335,602,978
author_curate_reward""
vote details (1)
@zipsardinia ·
not work too: 
> steempy set nodes ''
properties (22)
authorzipsardinia
permlinkre-zipsardinia-re-steempytutorials-part-26-retrieving-data-from-the-steem-blockchain-and-storing-into-a-mysql-database-20180707t090845936z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-07-07 09:08:45
last_update2018-07-07 09:08:45
depth2
children0
last_payout2018-07-14 09:08:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length37
author_reputation5,608,798,363,039
root_title"Part 26: Retrieving Data From The STEEM Blockchain And Storing Into A MySQL Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id63,757,797
net_rshares0