diff --git a/CHANGELOG.md b/CHANGELOG.md index 540413102..77b93e713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ at anytime. * ### Fixed - * + * fix stream_cost_estimate throwing exception on non decodeable claims * * diff --git a/lbrynet/lbrynet_daemon/Daemon.py b/lbrynet/lbrynet_daemon/Daemon.py index f3c3c8e76..e3c7a2f74 100644 --- a/lbrynet/lbrynet_daemon/Daemon.py +++ b/lbrynet/lbrynet_daemon/Daemon.py @@ -889,12 +889,13 @@ class Daemon(AuthJSONRPCServer): """ try: claim_response = yield self.session.wallet.resolve_uri(uri) + #TODO: fix me, this is a hack except Exception: claim_response = None result = None if claim_response and 'claim' in claim_response: - if 'value' in claim_response['claim']: + if 'value' in claim_response['claim'] and claim_response['claim']['value'] is not None: claim_value = ClaimDict.load_dict(claim_response['claim']['value']) cost = yield self._get_est_cost_from_metadata(claim_value, uri) result = round(cost, 5) @@ -1719,7 +1720,8 @@ class Daemon(AuthJSONRPCServer): 'size' (optional): (int) stream size, in bytes. if provided an sd blob won't be downloaded. Returns: - (float) Estimated cost in lbry credits + (float) Estimated cost in lbry credits, returns None if uri is not + resolveable """ cost = yield self.get_est_cost(uri, size) defer.returnValue(cost)