leoperegrino / bitui

Bitcoin TUI
GNU Affero General Public License v3.0
0 stars 0 forks source link

Fails to start (`requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)`) #1

Open azazar opened 8 months ago

azazar commented 8 months ago

Install command: pipx install git+https://github.com/leoperegrino/bitui Command: $HOME/.local/bin/bitui -c test -u "$BITCOIN_RPC_USER" -p "$BITCOIN_RPC_PASSWORD" http://localhost:$BITCOIN_RPC_PORT

Output

Traceback (most recent call last):
  File "/root/.local/pipx/venvs/bitui/lib/python3.9/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.local/bin/bitui", line 8, in <module>
    sys.exit(main())
  File "/root/.local/pipx/venvs/bitui/lib/python3.9/site-packages/bitui/main.py", line 85, in main
    exit_code = curses_wrapper(curses_main, rpc_config)
  File "/root/.local/pipx/venvs/bitui/lib/python3.9/site-packages/bitui/utils.py", line 74, in curses_wrapper
    return func(stdscr, *args, **kwds)
  File "/root/.local/pipx/venvs/bitui/lib/python3.9/site-packages/bitui/main.py", line 25, in curses_main
    app.query_chain()
  File "/root/.local/pipx/venvs/bitui/lib/python3.9/site-packages/bitui/controller/app.py", line 38, in query_chain
    info_result = self._api.get_blockchain_info()
  File "/root/.local/pipx/venvs/bitui/lib/python3.9/site-packages/bitui/network/btc.py", line 38, in get_blockchain_info
    return self.method(Calls.GETBLOCKCHAININFO).result
  File "/root/.local/pipx/venvs/bitui/lib/python3.9/site-packages/bitui/network/btc.py", line 34, in method
    return self._rpc_session.post(rpc_request)
  File "/root/.local/pipx/venvs/bitui/lib/python3.9/site-packages/bitui/network/rpc.py", line 85, in post
    return RPCResponse.from_json(response.json())
  File "/root/.local/pipx/venvs/bitui/lib/python3.9/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
leoperegrino commented 4 months ago

@azazar sorry, I haven't worked in this repo in a while and also missed this notification. Do you still want some help?

Regarding the error: did you ensure the bitcoin core was running? I think the RPC response was empty or the bitcoin core version had a breaking change on it's RPC

azazar commented 4 months ago

No, thanks. I don't need a remote access to a bitcoin node anymore.