Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: __init__() should return None #2

Open
pabx06 opened this issue Jul 29, 2018 · 8 comments
Open

TypeError: __init__() should return None #2

pabx06 opened this issue Jul 29, 2018 · 8 comments

Comments

@pabx06
Copy link

pabx06 commented Jul 29, 2018

balanceHistory$ python getHistory.py  1KYiKJEfdJtap9QX2v9BXJMpz2SfU4pgZw
Traceback (most recent call last):
  File "getHistory.py", line 5, in <module>
    from rpcclient import *
  File "/home/pabx/omnicore-0.3.0/balanceHistory/rpcclient.py", line 67, in <module>
    host=RPCHost()
TypeError: __init__() should return None
@achamely
Copy link
Contributor

achamely commented Jul 30, 2018

@pabx06 can you confirm that your Omnicore client is running and is accessible
what is the output of the command omnicore-cli getinfo and omnicore-cli omni_getinfo
can you also confirm you have the file /home/pabx/.bitcoin/bitcoin.conf and it has entries for rpcuser and rpcpassword

@pabx06
Copy link
Author

pabx06 commented Jul 30, 2018

#omni is running:
$ ps auxf|grep omni
pabx      8871  0.0  0.0  12784   992 pts/0    S+   18:43   0:00              \_ grep omni
pabx     24665  0.0  0.0  27984  2124 ?        Ss   Jul24   0:00 SCREEN -S omnicore
pabx     25238 66.0  3.4 2585576 1121856 pts/1 SLl+ Jul24 6292:28      \_ bin/omnicored -txindex

~/omnicore-0.3.0/bin$ ./omnicore-cli getinfo
{
  "version": 130200,
  "protocolversion": 70015,
  "walletversion": 130000,
  "balance": 0.00000000,
  "blocks": 534415,
  "timeoffset": -2,
  "connections": 33,
  "proxy": "",
  "difficulty": 5949437371609.53,
  "testnet": false,
  "keypoololdest": 1532397155,
  "keypoolsize": 100,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "errors": ""
}

~/omnicore-0.3.0/bin$ ./omnicore-cli omni_getinfo
{
  "omnicoreversion_int": 30000000,
  "omnicoreversion": "0.3.0",
  "mastercoreversion": "0.3.0",
  "bitcoincoreversion": "0.13.2",
  "block": 534415,
  "blocktime": 1532968183,
  "blocktransactions": 102,
  "totaltrades": 1678,
  "totaltransactions": 2681304,
  "alerts": [
  ]
}


@achamely
Copy link
Contributor

achamely commented Jul 30, 2018

@pabx06
2 things.

  1. We just pushed a quick patch. Please update your local repo
  2. You are missing the property id to run the report for in the command line: https://github.com/OmniLayer/balanceHistory#running

@achamely
Copy link
Contributor

If that works for you please go ahead and close out the issue

@pabx06
Copy link
Author

pabx06 commented Jul 30, 2018

didnt work for me:

balanceHistory$ git pull
remote: Counting objects: 9, done.
remote: Total 9 (delta 3), reused 3 (delta 3), pack-reused 6
Unpacking objects: 100% (9/9), done.
From https://github.com/OmniLayer/balanceHistory
   66ef0a1..6b63f64  master     -> origin/master
Updating 66ef0a1..6b63f64
Fast-forward
 README.md     | 2 +-
 getHistory.py | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

balanceHistory$ python getHistory.py 1KYiKJEfdJtap9QX2v9BXJMpz2SfU4pgZw 31
Traceback (most recent call last):
  File "getHistory.py", line 5, in <module>
    from rpcclient import *
  File "/home/pabx/omnicore-0.3.0/balanceHistory/rpcclient.py", line 67, in <module>
    host=RPCHost()
TypeError: __init__() should return None

@achamely
Copy link
Contributor

@pabx06 can you confirm the contents of ~/.bitcoin/bitcoin.conf (you can obscure any sensitive username/password info)
Also, what version of python are you using

@pabx06
Copy link
Author

pabx06 commented Aug 1, 2018

i have deleted that file.
it was :

server=1
rpcuser=
rpcpassword=

but getHistory.py gave me
Exception: RPC connection failure: 401 Unauthorized

@achamely
Copy link
Contributor

achamely commented Aug 1, 2018

@pabx06

In order for things to operate properly you will need to have the file ~/.bitcoin/bitcoin.con for the user that omnicored is running under/the user running getHistory

It should contain at the minimium

server=1
rpcuser=<a unique username>
rpcpassword=<a unique password>

This file is used/read by both omnicored when it starts up and the getHistory project.
Are you running both projects on the same machine as the same user?
What version of Python are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants