eprbell / dali-rp2

DaLI (Data Loader Interface) is a data loader and input generator for RP2 (https://pypi.org/project/rp2), the privacy-focused, free, open-source cryptocurrency tax calculator: DaLI removes the need to manually prepare RP2 input files. Just like RP2, DaLI is also free, open-source and it prioritizes user privacy.
https://pypi.org/project/dali-rp2/
Apache License 2.0
66 stars 42 forks source link

dali_generic misses proper missing argument catching. Can't even get help with the syntax #251

Open rapus95 opened 3 months ago

rapus95 commented 3 months ago
C:\Users\Aaron>dali_generic --help
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Python312\Scripts\dali_generic.exe\__main__.py", line 7, in <module>
  File "C:\Python312\Lib\site-packages\dali\plugin\country\generic.py", line 23, in dali_entry
    dali_main(Generic())
              ^^^^^^^^^
  File "C:\Python312\Lib\site-packages\rp2\plugin\country\generic.py", line 29, in __init__
    raise RP2ValueError("CURRENCY_CODE environment variable not found: it is required to use the generic country plugin")
rp2.rp2_error.RP2ValueError: CURRENCY_CODE environment variable not found: it is required to use the generic country plugin
eprbell commented 3 months ago

This is explained in the Generic country documentation. You need to define two environment variables: CURRENCY_CODE and LONG_TERM_CAPITAL_GAINS.

To set environment variables for the generic RP2 executable on Unix-like systems:

CURRENCY_CODE=eur LONG_TERM_CAPITAL_GAINS=1000000000 rp2_generic...

To set environment variables for the generic RP2 executable on Windows systems:

Set CURRENCY_CODE=eur LONG_TERM_CAPITAL_GAINS=1000000000 rp2_generic...
rapus95 commented 3 months ago

oh, it didn't come to my mind to like into the rp2 docs to execute dali, oops