question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example files do not work

See original GitHub issue

Hi, I’m trying to run the example files:

  • crypto_example.config
  • crypto_example.ods

But upon running, get these errors

INFO: Country: us
INFO: Accounting Method: fifo
INFO: Configuration file: crypto_example.config
INFO: Input file: crypto_example.ods
INFO: Processing BTC
INFO: Processing ETH
ERROR: Fatal exception occurred:
Traceback (most recent call last):
  File "/Users/swissarmybox/Desktop/cry/rp2stuff/venv/lib/python3.8/site-packages/rp2/rp2_main.py", line 91, in _rp2_main_internal
    input_data: InputData = parse_ods(configuration=configuration, asset=asset, input_file_handle=input_file_handle)
  File "/Users/swissarmybox/Desktop/cry/rp2stuff/venv/lib/python3.8/site-packages/rp2/ods_parser.py", line 123, in parse_ods
    transaction = _create_transaction(configuration, current_table_type, i + 1, row_values)
  File "/Users/swissarmybox/Desktop/cry/rp2stuff/venv/lib/python3.8/site-packages/rp2/ods_parser.py", line 190, in _create_transaction
    argument_pack: Dict[str, Any] = configuration.get_in_table_constructor_argument_pack(row_values)
  File "/Users/swissarmybox/Desktop/cry/rp2stuff/venv/lib/python3.8/site-packages/rp2/configuration.py", line 163, in get_in_table_constructor_argument_pack
    return self.__get_table_constructor_argument_pack(data, "in", self.__in_header)
  File "/Users/swissarmybox/Desktop/cry/rp2stuff/venv/lib/python3.8/site-packages/rp2/configuration.py", line 154, in __get_table_constructor_argument_pack
    raise RP2ValueError(
rp2.rp2_error.RP2ValueError: Parameter 'data' has length 13, but required minimum from in-table headers in crypto_example.config is 14: ['2020-06-03T11:23Z', 'Coinbase', 'Bob', 'brown', 'fox', 'Buy', 'ETH', 10.0, 244.0, 2440.0, 2465.0, 25.0, None]
INFO: Log file: ./log/rp2_2022_02_26_09_58_40_020721.log
INFO: Generated output directory: output
INFO: Done

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
eprbellcommented, Mar 1, 2022

No, you’re asking good questions and it’s good to discuss publicly so that others can read too. Also thanks for the link.

1reaction
eprbellcommented, Feb 26, 2022

Thanks for all the good questions and feedback: this will be useful for others too.

Here’s my understanding on the topic of theft, displacement and rug pulls:

  • crypto theft/displacement is not tax deductible (therefore it doesn’t need a new transaction type in RP2)
  • rug pulls are treated as a normal loss (so again, no need for a new transaction type in RP2)

Here are articles that discuss this topic:

From the perspective of RP2 the only question is: is a new transaction type required? I think the answer is no (existing ones are sufficient to capture these scenarios), but I’m happy to stand corrected if anybody has a better understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why a sample file is important for troubleshooting. How to do it.
To try to help you, we need to figure out what is going on in the document (file). We do not want your...
Read more >
6 Common CSV Import Errors and How to Fix Them - Flatfile
Attempting to import data with different encoded files would simply not work. Check out this Inkit case study to see this exact example....
Read more >
16 Do-files | Stata
$ stata -b do filename & to run the do-file in the background. The above two examples both involve the use of stata,...
Read more >
Windows Basics: Working with Files - GCF Global
Learn how to use the Windows file system and find Windows files with ease after reading this free lesson.
Read more >
Working With Files - Gradle User Manual
In the following modified example, we use a report task defined elsewhere that ... You may have a need to copy not just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found