Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: sippsnapp on September 28, 2012, 06:43:30 PM



Title: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on September 28, 2012, 06:43:30 PM
Im trying to install/running eloipool.
Actualy i face an error as followed:
Code:
root@j064:/opt/eloipool# ./eloipool.py
Traceback (most recent call last):
  File "./eloipool.py", line 46, in <module>
    import jsonrpc
ImportError: No module named jsonrpc
root@j064:/opt/eloipool#
Any idea?


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: SAC on September 28, 2012, 08:06:43 PM
Im trying to install/running eloipool.
Actualy i face an error as followed:
Code:
root@j064:/opt/eloipool# ./eloipool.py
Traceback (most recent call last):
  File "./eloipool.py", line 46, in <module>
    import jsonrpc
ImportError: No module named jsonrpc
root@j064:/opt/eloipool#
Any idea?

Install bzr then.

Code:
bzr checkout http://bzr.json-rpc.org/trunk ; cd trunk/python-jsonrpc
sudo python setup.py install


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on September 28, 2012, 10:03:30 PM
installed bzr with apt-get bzr and executed the commands as recommended, no success yet.


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: SAC on September 29, 2012, 12:32:03 AM
installed bzr with apt-get bzr and executed the commands as recommended, no success yet.

Weird I searched on how to see your installed python modules and found the python-pip which contains the pip command I found to use like so after I installed the python-jsonrpc.

Code:

miner2@miner2:~/trunk/python-jsonrpc$ pip freeze | grep rpc
jsonrpc==0.01

It clearly shows it as installed so that program you are trying to run has some kind of problem finding it, I have no clue how to track that down.


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on September 29, 2012, 02:40:13 AM
I had python3 installed with this tutorial:
http://www.unixmen.com/howto-install-python-3-x-in-ubuntu-debian-fedora-centos/

The software that was intended to run is elpoipool.


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: nomnomnom on September 29, 2012, 02:37:03 PM
I had python3 installed with this tutorial:
http://www.unixmen.com/howto-install-python-3-x-in-ubuntu-debian-fedora-centos/

The software that was intended to run is elpoipool.


jsonrpc probably got installed to the system python in /usr/lib/python2.7 or something,
if you have python3 in /opt/python3 like in the link you posted, try to
run the jsonrpc install maybe something like this
Code:
sudo python setup.py install --root=/opt/python3

Or try --prefix not sure which is the right one.


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on September 29, 2012, 06:34:47 PM
This is the up to date error i get:
https://bitcointalk.org/index.php?topic=113915.msg1231605#msg1231605


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on October 01, 2012, 05:16:05 AM
Installed everything again on a new ubuntu 12 system and i get the same json error.


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: Luke-Jr on October 01, 2012, 10:00:43 AM
Per the README (http://gitorious.org/bitcoin/eloipool/blobs/master/README), you need python-bitcoinrpc (not jsonrpc)


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on October 02, 2012, 07:33:52 AM
How do i do that, i downloaded the dependencies including the python-bitcoinjsonrpc, its currently in the opt folder together with the eloipool folder.
What is to then?


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: Luke-Jr on October 02, 2012, 09:47:28 AM
How do i do that, i downloaded the dependencies including the python-bitcoinjsonrpc, its currently in the opt folder together with the eloipool folder.
What is to then?

Symlink the directory with authproxy.py as eloipool/jsonrpc


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on October 02, 2012, 10:04:48 AM
thx, the error above is solved with it but now i get another error:
Code:
root@j064:/opt/eloipool# ./eloipool.py
2012-10-02 10:02:58,493 jsonrpc_getwork WARNING Error importing 'midstate' module; work will not provide midstates

>>> Traceback (most recent call last):
  File "./eloipool.py", line 682, in <module>
    MM.start()
  File "/opt/eloipool/merklemaker.py", line 483, in start
    self._prepare()
  File "/opt/eloipool/merklemaker.py", line 108, in _prepare
    self.updateMerkleTree()
  File "/opt/eloipool/merklemaker.py", line 251, in updateMerkleTree
    MP = self.access.getblocktemplate(self.GBTReq)
  File "/opt/eloipool/jsonrpc/authproxy.py", line 106, in __call__
    raise JSONRPCException(resp['error'])
jsonrpc.authproxy.JSONRPCException


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on October 02, 2012, 10:10:31 AM
now thats left:
Code:
root@j064:/opt/eloipool# ./eloipool.py

>>> Traceback (most recent call last):
  File "./eloipool.py", line 682, in <module>
    MM.start()
  File "/opt/eloipool/merklemaker.py", line 483, in start
    self._prepare()
  File "/opt/eloipool/merklemaker.py", line 108, in _prepare
    self.updateMerkleTree()
  File "/opt/eloipool/merklemaker.py", line 251, in updateMerkleTree
    MP = self.access.getblocktemplate(self.GBTReq)
  File "/opt/eloipool/jsonrpc/authproxy.py", line 106, in __call__
    raise JSONRPCException(resp['error'])
jsonrpc.authproxy.JSONRPCException

>>> quit()
root@j064:/opt/eloipool#


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: Luke-Jr on October 02, 2012, 10:45:32 AM
bitcoind problem


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on October 02, 2012, 12:26:41 PM
No idea yet.
The bitcoind im running is http://gitorious.org/~Luke-Jr/bitcoin/luke-jr-bitcoin/commits/next-eligius
compiled with:
Code:
make -f makefile.unix clean; make -f makefile.unix USE_UPNP=1 bitcoind

my conf is:
Code:
# bitcoin.conf configuration file. Lines beginning with # are comments.

# Network-related settings:

# Run on the test network instead of the real bitcoin network.
#testnet=1

# Connect via a socks4 proxy
#proxy=127.0.0.1:9050

# Use as many addnode= settings as you like to connect to specific peers
#addnode=69.164.218.197
#addnode=10.0.0.2:8333

# . or use as many connect= settings as you like to connect ONLY
# to specific peers:
#connect=69.164.218.197
#connect=10.0.0.1:8333

# Do not use Internet Relay Chat (irc.lfnet.org #bitcoin channel) to
# find other peers.
#noirc=1

# Maximum number of inbound+outbound connections.
#maxconnections=

# JSON-RPC options (for controlling a running Bitcoin/bitcoind process)

# server=1 tells Bitcoin to accept JSON-RPC commands.
server=1

# You must set rpcuser and rpcpassword to secure the JSON-RPC api
rpcuser=user
rpcpassword=pass

# How many seconds bitcoin will wait for a complete RPC HTTP request.
# after the HTTP connection is established.
rpctimeout=90

# By default, only RPC connections from localhost are allowed. Specify
# as many rpcallowip= settings as you like to allow connections from
# other hosts (and you may use * as a wildcard character):
#rpcallowip=10.1.1.34
#rpcallowip=192.168.1.*

# Listen for RPC connections on this TCP port:
rpcport=8332

# You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind
# running on another host using this option:
rpcconnect=127.0.0.1

# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
# with Bitcoin -server or bitcoind
#rpcssl=1

# OpenSSL settings used when rpcssl=1
rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
rpcsslcertificatechainfile=server.cert
rpcsslprivatekeyfile=server.pem

# Miscellaneous options

# Set gen=1 to attempt to generate bitcoins
gen=0

# Use SSE instructions to try to generate bitcoins faster. For muliple core processors.
#4way=1

# Pre-generate this many public/private key pairs, so wallet backups will be valid for
# both prior transactions and several dozen future transactions.
keypool=100

# Pay an optional transaction fee every time you send bitcoins. Transactions with fees
# are more likely than free transactions to be included in generated blocks, so may
# be validated sooner.
paytxfee=0.00

# Allow direct connections for the .pay via IP address. feature.
#allowreceivebyip=1

# User interface options

# Start Bitcoin minimized
#min=1

# Minimize to the system tray
#minimizetotray=1

Code:
root@j064:/home/eloi/luke-jr-bitcoin/src# ./bitcoind getinfo
{
    "version" : 60010,
    "protocolversion" : 70000,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 189674,
    "connections" : 14,
    "proxy" : "",
    "difficulty" : 1866391.30500321,
    "testnet" : false,
    "keypoololdest" : 1349160278,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "maxtxfee" : 0.01000000,
    "forcetxfee" : false,
    "errors" : ""
}


If thats not causing the error what else coudl be the reason?


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: Luke-Jr on October 02, 2012, 12:27:56 PM
Not having all the blocks? run: bitcoind getblocktemplate


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on October 02, 2012, 12:35:26 PM
Bitcoind is still downloading, does this play a role?


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: Inaba on October 02, 2012, 03:01:52 PM
Yes, if it's not up to date, you will get that error.


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on October 02, 2012, 03:04:59 PM
its the reposity you told me to use, its was also working on the server with the damaged hdds i guess.
http://gitorious.org/~Luke-Jr/bitcoin/luke-jr-bitcoin/commits/next-eligius

So which one should i use?


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: Inaba on October 02, 2012, 03:49:14 PM
Quote
"blocks" : 189674,

You are not at the current block height.


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: sippsnapp on October 02, 2012, 07:30:52 PM
Quote
"blocks" : 189674,

You are not at the current block height.

Thank you and the others very much indeed for the support!! Its working and without you guys it would have taken ages for me to set this up.
 ;D ;D ;D
I will post the installation log in the eloipool thread, may it helps others.


Title: Re: "ImportError: No module named jsonrpc" eloipool installation
Post by: wuzamarine on January 17, 2014, 12:37:02 AM
How do i do that, i downloaded the dependencies including the python-bitcoinjsonrpc, its currently in the opt folder together with the eloipool folder.
What is to then?

Symlink the directory with authproxy.py as eloipool/jsonrpc


I am trying to bitcoinrpc and jsonrpc working, after running the setup in python-bitcoinrpc/ for both bitcoinrpc and jsonrpc, I then ->  ln -s dep/python-bitcoinrpc/bitcoinrpc/ eloipool/jsonrpc  (tries reverse too) and still i get ->  ImportError: No module named jsonrpc