jgarzik / python-bitcoinrpc

Python interface to bitcoin's JSON-RPC API
GNU Lesser General Public License v2.1
644 stars 304 forks source link

TypeError: unsupported operand type(s) for +: 'NoneType' and 'bytes' #81

Open RoboticMind opened 6 years ago

RoboticMind commented 6 years ago

On python 3.6 When I try to open any connection I get the error in the title on line 100 in the AuthServiceProxy: authpair = user + b':' + passwd

JonasPf commented 6 years ago

Just came across this myself. This happens to me when I don't specify username/password.

The solution that worked for me was to create username/password with the rpcauth.py script as described here: https://bitcoin.stackexchange.com/questions/46782/rpc-cookie-authentication

The python code must then use that username/password as described here: https://github.com/jgarzik/python-bitcoinrpc#example

It should look somewhat like this:

bitcoinrpc.authproxy.AuthServiceProxy("http://USERNAME:PASSWORD@127.0.0.1:8332")