Closed X1011 closed 2 months ago
I was looking through PRs, and it looks like #236 may fix this when implemented.
Actually, #225 will ultimately fix this. I have the entire forex code taken apart at the moment. We will be mostly doing away with exchangerates.host and making it an option only.
Do you need it right away? Are you filing taxes? If so, you can implement the monkey patch #236 in the meantime.
Sounds good 👍 I don't need it now; I got past it by configuring an access key.
Is there an ETA for it?
Running into this:
INFO: Resolving transactions
0% | | Elapsed Time: 0:00:00 ETA: --:--:--
ERROR: Fatal exception occurred:
Traceback (most recent call last):
File "C:\Python312\Lib\site-packages\dali\dali_main.py", line 193, in _dali_main_internal
resolved_transactions: List[AbstractTransaction] = resolve_transactions(transactions, dali_configuration, args.read_spot_price_from_web)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\dali\transaction_resolver.py", line 259, in resolve_transactions
transaction = _convert_fiat_fields_to_native_fiat(transaction, global_configuration)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\dali\transaction_resolver.py", line 179, in _convert_fiat_fields_to_native_fiat
conversion: RateAndPairConverter = _get_pair_conversion_rate(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\dali\transaction_resolver.py", line 110, in _get_pair_conversion_rate
rate = cast(AbstractPairConverterPlugin, pair_converter).get_conversion_rate(timestamp, from_asset, to_asset, exchange)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\dali\abstract_pair_converter_plugin.py", line 172, in get_conversion_rate
historical_bar = self.get_historic_bar_from_native_source(timestamp, from_asset, to_asset, exchange)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\dali\plugin\pair_converter\ccxt.py", line 281, in get_historic_bar_from_native_source
if self._is_fiat_pair(from_asset, to_asset):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\dali\abstract_pair_converter_plugin.py", line 245, in _is_fiat_pair
return self._is_fiat(from_asset) and self._is_fiat(to_asset)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\dali\abstract_pair_converter_plugin.py", line 249, in _is_fiat
self._build_fiat_list()
File "C:\Python312\Lib\site-packages\dali\abstract_pair_converter_plugin.py", line 193, in _build_fiat_list
self._check_fiat_access_key()
File "C:\Python312\Lib\site-packages\dali\abstract_pair_converter_plugin.py", line 343, in _check_fiat_access_key
raise RP2ValueError(
rp2.rp2_error.RP2ValueError: No fiat access key. To convert fiat assets, please acquire an access key from exchangerate.host.The access key will then need to be added to the configuration file. For more details visit https://github.com/eprbell/dali-rp2/blob/main/docs/configuration_file.md
INFO: Log file: ./log/rp2_2024_06_24_12_02_41_209051.log
INFO: Generated output directory: output
INFO: Done
Have you pulled the latest release? #225 did away with the need for a fiat access key. It just got merged yesterday. You will need to pull it from github.
Or, you can just put in a bogus fiat access key and it will work just fine.
I'm closing this as it seems resolved. Let us know if you are still having issues.
When I tried to run DaLI, it stopped with an error requesting an access key for exchangerate.host, even though all my fiat transactions are in USD. I went and signed up for exchangerate.host and configured the key and ran it again, but the key was never used, according to my exchangerate.host dashboard, so it seems the check for this key is too eager. It looks like this was introduced in PR #212
rp2.rp2_error.RP2ValueError: No fiat access key. To convert fiat assets, please acquire an access key from exchangerate.host.The access key will then need to be added to the configuration file. For more details visit https://github.com/eprbell/dali-rp2/blob/main/docs/configuration_file.md
full log