elsehow / tendermint-tax

Compute the fair market value (FMV) of staking rewards at time of receipt.
5 stars 2 forks source link

Merge Error for cosmoshub chain #8

Open pmorrow90 opened 2 years ago

pmorrow90 commented 2 years ago

Getting the following error

(venv) ➜ tendermint-tax git:(main) ✗ python3 tendermint-tax.py --chain cosmoshub --address [cosmoshubaddress] --ticker ATOM --fystart "2021-01-01" --fyend "2021-12-31" --outfile "cosmos.csv" -v 2022-02-28 14:40:41 INFO: Querying RPC for transfer.recipient='[cosmoshubaddress]' 2022-02-28 14:40:42 INFO: Computing inflows and outflows for [cosmoshubaddress] 2022-02-28 14:40:42 INFO: Querying RPC for the UTC time of each relevant block height 2022-02-28 14:40:42 INFO: Querying historical pricing data on ATOM 2022-02-28 14:40:48 INFO: Computing historical fair market value (FMV) for ATOM 2022-02-28 14:40:48 INFO: Aligning blocks with historical pricing data Traceback (most recent call last): File "/Users/zinc-ops/Documents/GitHub/tendermint-tax/tendermint-tax.py", line 101, in merged_df = pd.merge_asof(inflow_outflow_df, fmvs_df, on='time', direction='nearest') File "/Users/zinc-ops/Documents/GitHub/tendermint-tax/venv/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 580, in merge_asof op = _AsOfMerge( File "/Users/zinc-ops/Documents/GitHub/tendermint-tax/venv/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 1740, in init _OrderedMerge.init( File "/Users/zinc-ops/Documents/GitHub/tendermint-tax/venv/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 1623, in init _MergeOperation.init( File "/Users/zinc-ops/Documents/GitHub/tendermint-tax/venv/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 699, in init ) = self._get_merge_keys() File "/Users/zinc-ops/Documents/GitHub/tendermint-tax/venv/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 1858, in _get_merge_keys raise MergeError(msg) pandas.errors.MergeError: incompatible merge keys [0] dtype('<M8[ns]') and datetime64[ns, UTC], must be the same type

elsehow commented 2 years ago

I cannot replicate this error without knowing your Cosmos address. Please try with a new Cosmos address or provide the Cosmos address that causes the error.