lbry-sdk
lbry-sdk copied to clipboard
stream_cost_estimate: does not resolve URIs
lbrynet stream cost_estimate 'lbry://@xeroforhire#3/DLive-Stream-Dec-1#b'
Results in failure
{
"code": -32500,
"data": {
"args": [],
"command": "stream_cost_estimate",
"kwargs": {
"uri": "lbry://@xeroforhire#3/DLive-Stream-Dec-1#b"
},
"name": "KeyError",
"traceback": [
"Traceback (most recent call last):",
" File \"/opt/git/lbry-sdk/lbry/extras/daemon/daemon.py\", line 755, in _process_rpc_call",
" result = await result",
" File \"/opt/git/lbry-sdk/lbry/extras/daemon/daemon.py\", line 833, in get_est_cost_from_uri",
" claim_response = resolved[uri]",
"KeyError: 'lbry://@xeroforhire#3/DLive-Stream-Dec-1#b'",
""
]
},
"message": "'lbry://@xeroforhire#3/DLive-Stream-Dec-1#b'"
}
https://github.com/lbryio/lbry-sdk/blob/442326f1d8fc8d9063c783c6d98e948758f130b5/lbry/extras/daemon/daemon.py#L3801
https://github.com/lbryio/lbry-sdk/blob/442326f1d8fc8d9063c783c6d98e948758f130b5/lbry/extras/daemon/daemon.py#L826
Except for the daemon code, the source does not have a reference to cost-estimate
anywhere, so there is currently no test that checks that this command works well.