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

Unknown action: Dividend, Tax Withholding #553

Open
tsuharesu opened this issue Aug 30, 2024 · 3 comments
Open

Unknown action: Dividend, Tax Withholding #553

tsuharesu opened this issue Aug 30, 2024 · 3 comments

Comments

@tsuharesu
Copy link

Goog started paying dividends, the calculator breaks without knowing what to do.

Traceback (most recent call last):
  File "/Users/tsuharesu/Code/capital-gains-calculator/.venv/bin/cgt-calc", line 8, in <module>
    sys.exit(init())
             ^^^^^^
  File "/Users/tsuharesu/Code/capital-gains-calculator/.venv/lib/python3.12/site-packages/cgt_calc/main.py", line 877, in init
    sys.exit(main())
             ^^^^^^
  File "/Users/tsuharesu/Code/capital-gains-calculator/.venv/lib/python3.12/site-packages/cgt_calc/main.py", line 830, in main
    broker_transactions = read_broker_transactions(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tsuharesu/Code/capital-gains-calculator/.venv/lib/python3.12/site-packages/cgt_calc/parsers/__init__.py", line 65, in read_broker_transactions
    transactions += read_schwab_equity_award_json_transactions(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tsuharesu/Code/capital-gains-calculator/.venv/lib/python3.12/site-packages/cgt_calc/parsers/schwab_equity_award_json.py", line 368, in read_schwab_equity_award_json_transactions
    SchwabTransaction(transac, transactions_file, fields)
  File "/Users/tsuharesu/Code/capital-gains-calculator/.venv/lib/python3.12/site-packages/cgt_calc/parsers/schwab_equity_award_json.py", line 196, in __init__
    action = action_from_str(self.raw_action)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/tsuharesu/Code/capital-gains-calculator/.venv/lib/python3.12/site-packages/cgt_calc/parsers/schwab_equity_award_json.py", line 151, in action_from_str
    raise ParsingError("schwab transactions", f"Unknown action: {label}")
cgt_calc.exceptions.ParsingError: While parsing schwab transactions, Unknown action: Dividend

Example of dividends and Tax Withholding:


      "Date": "06/17/2024",
      "Action": "Dividend",
      "Symbol": "GOOG",
      "Quantity": null,
      "Description": "Credit",
      "FeesAndCommissions": null,
      "DisbursementElection": null,
      "Amount": "$34.17",
      "TransactionDetails": []
    },
    {
      "Date": "06/17/2024",
      "Action": "Tax Withholding",
      "Symbol": "GOOG",
      "Quantity": null,
      "Description": "Debit",
      "FeesAndCommissions": null,
      "DisbursementElection": null,
      "Amount": "-$5.12",
      "TransactionDetails": []
    },
@vmartinv
Copy link
Collaborator

Is the dividend coming from the equity award file? What command are you using? If the dividend is coming from the stock you are holding they should show up in the usual transaction file, not from the equity awards.

@tsuharesu
Copy link
Author

tsuharesu commented Aug 30, 2024

Is the dividend coming from the equity award file?

Yes, from the equity awards JSON export. Since some months ago, GSUs pay dividends.

@m01
Copy link
Contributor

m01 commented Nov 29, 2024

Looks like there's a PR for this: #568

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

3 participants