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

Problem with --tax-output=2021 #19

Closed
flanello opened this issue Sep 7, 2022 · 1 comment
Closed

Problem with --tax-output=2021 #19

flanello opened this issue Sep 7, 2022 · 1 comment

Comments

@flanello
Copy link
Contributor

flanello commented Sep 7, 2022

Hello,
at first, thanks for the cool software.
Without the option --tax-output=2021 the program works fine.

However, when using the option --tax-output=2021 it prints the summary for 2021 on the command line but the csv file is not generated. It breaks with the following trace.

Traceback (most recent call last):
File "./tw-pnl.py", line 1124, in
main(sys.argv[1:])
File "./tw-pnl.py", line 1121, in main
check(all_wk, output_summary, output_csv, output_excel, tax_output, show)
File "./tw-pnl.py", line 1046, in check
new_wk = append_yearly_stats(new_wk, tax_output, stats, min_year, max_year)
File "./tw-pnl.py", line 710, in append_yearly_stats
df = df_append_row(df, ['', '', '', '', '', '', '', '', '', '', ''] + end)
File "./tw-pnl.py", line 465, in df_append_row
df.loc[len(df)] = row
File "/usr/lib/python3/dist-packages/pandas/core/indexing.py", line 723, in setitem
iloc._setitem_with_indexer(indexer, value, self.name)
File "/usr/lib/python3/dist-packages/pandas/core/indexing.py", line 1724, in _setitem_with_indexer
self._setitem_with_indexer_missing(indexer, value)
File "/usr/lib/python3/dist-packages/pandas/core/indexing.py", line 2027, in _setitem_with_indexer_missing
raise ValueError("cannot set a row with mismatched columns")
ValueError: cannot set a row with mismatched columns

@laroche
Copy link
Owner

laroche commented Sep 8, 2022

Thanks for this report. (So much for writing a change without testing it.)

A fix is pushed into the repository, please report if further problem still show up or this fix does not work for you.

regards from Stuttgart,

Florian La Roche

@laroche laroche closed this as completed Sep 8, 2022
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

2 participants