Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spot price for USD->USD not found #234

Closed
tucamsam opened this issue Apr 10, 2024 · 5 comments
Closed

Spot price for USD->USD not found #234

tucamsam opened this issue Apr 10, 2024 · 5 comments
Assignees

Comments

@tucamsam
Copy link

Trying to last second get my taxes in, and found this project - super excited about it.
However, when I tried to process my Pionex data, it seems to fall apart on this line

"Date","Received Quantity","Received Currency","Sent Quantity","Sent Currency","Fee Amount","Fee Currency","Tag"
"01/01/2023 00:36:22","4.00000000","DOGE","0.27800000","USD","0.00400000","DOGE",""

With the following output

╰─ dali_us -s -o output -p try_ config.ini
INFO: Country: us
INFO: Initialized input plugin 'dali.plugin.input.csv.pionex'
INFO: No pair converter plugins found in configuration file: using default pair converters.
INFO: Reading crypto data using plugin 'dali.plugin.input.csv.pionex'
INFO: Resolving transactions
ERROR: Fatal exception occurred:
Traceback (most recent call last):
  File "/Users/ctucker/.pyenv/versions/3.10.13/lib/python3.10/site-packages/dali/dali_main.py", line 181, in _dali_main_internal
    resolved_transactions: List[AbstractTransaction] = resolve_transactions(transactions, dali_configuration, args.read_spot_price_from_web)
  File "/Users/ctucker/.pyenv/versions/3.10.13/lib/python3.10/site-packages/dali/transaction_resolver.py", line 246, in resolve_transactions
    transaction = _update_spot_price_from_web(transaction, global_configuration)
  File "/Users/ctucker/.pyenv/versions/3.10.13/lib/python3.10/site-packages/dali/transaction_resolver.py", line 144, in _update_spot_price_from_web
    raise RP2RuntimeError(
rp2.rp2_error.RP2RuntimeError: Spot price for __unknown:2023-01-01 01:21:10+00:00:USD->USD not found on any pair converter plugin
INFO: Log file: ./log/rp2_2024_04_09_22_01_55_583554.log
INFO: Generated output directory: output
INFO: Done

I'm using the for-cointracker.csv file directly as mentioned in the docs, but for some reason it looks like it's trying to find a spot price for USD -> USD?

Am I misunderstanding this? It seems that it shouldn't be trying to do this.

Please let me know if there's any other info I can provide to better debug this. I'm hoping maybe once I get my taxes done this week, maybe I'll have some time to contribute to this project.

@macanudo527 macanudo527 self-assigned this Apr 10, 2024
@macanudo527
Copy link
Collaborator

The transaction it is choking on actually occurred at 2023-01-01 01:21:10+00:00.

The DOGE one that you submitted occurred at 01/01/2023 00:36:22

I just used the Pionex plugin to process my US taxes, but I never use fiat. I always trade and deal with USDT. So, there must be some issue with fiat processing. Maybe it is a bank deposit?

@tucamsam
Copy link
Author

My fault - I grabbed the wrong stack trace - I had removed the offending line to see if it was just that one, or USD in general...here's that trace:

╰─ dali_us -s -o output -p try_ config.ini
INFO: Country: us
INFO: Initialized input plugin 'dali.plugin.input.csv.pionex'
INFO: No pair converter plugins found in configuration file: using default pair converters.
INFO: Reading crypto data using plugin 'dali.plugin.input.csv.pionex'
INFO: Resolving transactions
ERROR: Fatal exception occurred:
Traceback (most recent call last):
  File "/Users/ctucker/.pyenv/versions/3.10.13/lib/python3.10/site-packages/dali/dali_main.py", line 181, in _dali_main_internal
    resolved_transactions: List[AbstractTransaction] = resolve_transactions(transactions, dali_configuration, args.read_spot_price_from_web)
  File "/Users/ctucker/.pyenv/versions/3.10.13/lib/python3.10/site-packages/dali/transaction_resolver.py", line 246, in resolve_transactions
    transaction = _update_spot_price_from_web(transaction, global_configuration)
  File "/Users/ctucker/.pyenv/versions/3.10.13/lib/python3.10/site-packages/dali/transaction_resolver.py", line 144, in _update_spot_price_from_web
    raise RP2RuntimeError(
rp2.rp2_error.RP2RuntimeError: Spot price for __unknown:2023-01-01 00:36:22+00:00:USD->USD not found on any pair converter plugin
INFO: Log file: ./log/rp2_2024_04_09_21_56_36_401006.log
INFO: Generated output directory: output
INFO: Done

And for completeness sake, here are the first 3 transactions:

"Date","Received Quantity","Received Currency","Sent Quantity","Sent Currency","Fee Amount","Fee Currency","Tag"
"01/01/2023 00:11:25","0.00337580","ETH","0.42960000","ATOM","0.00000338","ETH",""
"01/01/2023 00:36:22","4.00000000","DOGE","0.27800000","USD","0.00400000","DOGE",""
"01/01/2023 01:21:10","399629.00000000","SHIB","3.21701345","USD","399.62900000","SHIB",""

@macanudo527
Copy link
Collaborator

@tucamsam I wrote up a monkey patch that skips pricing of native fiat transactions that seems to resolve this.

Are you able to give it a try? Otherwise, we can try to get a release out with it, but it might take a while.

@tucamsam
Copy link
Author

@macanudo527 - sure thing - I'd messed around with my own monkey patch, but it still ended up failing after running for a while

@macanudo527
Copy link
Collaborator

I'm closing this as #225 should have fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants