santiment / sanpy

Santiment API Python Client
MIT License
94 stars 29 forks source link

Error for `san.available_metrics` for version 0.11.1 #160

Closed konrad4LI closed 1 year ago

konrad4LI commented 1 year ago

When upgrading the client from 0.10.2 to 0.11.1 I get an error when calling san.available_metrics

Minimal example

import san
san.available_metrics

The end of the tracelog looks like the following

... in available_metrics() 6 sanbase_graphql_functions = inspect.getmembers(san.sanbase_graphql, inspect.isfunction) 7 all_functions = list(map(lambda x: x[0], sanbase_graphql_functions)) + execute_gql('{query: getAvailableMetrics}')['query'] ----> 8 all_functions.remove('get_metric') 9 return all_functions ValueError: list.remove(x): x not in list

In 0.10.2 there was no issue with the call.

IvanIvanoff commented 1 year ago

Thanks for the fast catch!

Version 0.11.2 which fixes this issue is released.