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

KeyError: 'xxxxxx' #46

Open
NandeeshHD opened this issue Oct 29, 2024 · 1 comment
Open

KeyError: 'xxxxxx' #46

NandeeshHD opened this issue Oct 29, 2024 · 1 comment

Comments

@NandeeshHD
Copy link

I am getting the following error while processing the transactions:

(tastytrade) ➜  tastyworks-pnl git:(main) python3 tw-pnl.py --assume-individual-stock --tax-output=2023 --output-csv=tastyworks-tax-2023.csv ~/Downloads/tastytrade_transactions_history_x5WX66849_240101_to_241029.csv
Assignment/Exercise for a long option, please move pnl on next line to stock:
Traceback (most recent call last):
  File "/Users/nharalahalli/workspace_nd/tastyworks-pnl/tw-pnl.py", line 1418, in <module>
    main(sys.argv[1:])
  File "/Users/nharalahalli/workspace_nd/tastyworks-pnl/tw-pnl.py", line 1415, in main
    check(all_wk, output_summary, output_csv, output_excel, tax_output, show, verbose, debug)
  File "/Users/nharalahalli/workspace_nd/tastyworks-pnl/tw-pnl.py", line 1103, in check
    (tsubcode in ('Expiration', 'Exercise', 'Assignment', 'Cash Settled Assignment', 'Cash Settled Exercise') and not fifos_islong(fifos, asset))):
                                                                                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nharalahalli/workspace_nd/tastyworks-pnl/tw-pnl.py", line 408, in fifos_islong
    return fifos[asset][0][2] > 0
           ~~~~~^^^^^^^
KeyError: 'SPXW  240119C04825000 C4825 24-01-19'
@NandeeshHD
Copy link
Author

I can send the input data via email.

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

No branches or pull requests

1 participant