JetJet13 / NuExplorerOS

Nu Network Block Explorer
10 stars 15 forks source link

File "NuParserv007.py", line 40, in <module> BlockCount = access.getinfo()["blocks"] TypeError: 'NoneType' object has no attribute '__getitem__' #6

Open zhuchunyu opened 8 years ago

zhuchunyu commented 8 years ago

Get data failed,I added the following test code,The acquired data is empty.

access = AuthServiceProxy("http://user:pass@127.0.0.1:14001") getInfo = access.getinfo() print getInfo print access.getblockcount() print access.getdifficulty() print access.getnetworkghps() print access.getcustodianvotes() print access.getpeerinfo()

The value is printed out None None None None None None

File "NuParserv007.py", line 40, in BlockCount = access.getinfo()["blocks"] TypeError: 'NoneType' object has no attribute 'getitem'

backpacker69 commented 8 years ago

you are using wrong bitcoinrpc it seems, i had the same problem. I downloaded this one https://github.com/jgarzik/python-bitcoinrpc and it works

huafei117 commented 8 years ago

not change at PIP

https://github.com/jgarzik/python-bitcoinrpc/commit/8c0114bfbf7650d40a88b20d1e16ff79d768f3a9

JetJet13 commented 8 years ago

hey @zhuchunyu , it seems there's a bug with the pip install python-bitcoinrpc version. Run pip install git+https://github.com/jgarzik/python-bitcoinrpc.git instead. Source: Bitcoin StackExchange