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

ValueError: NaTType does not support strftime #101

Open
mincong-h opened this issue Apr 21, 2024 · 2 comments
Open

ValueError: NaTType does not support strftime #101

mincong-h opened this issue Apr 21, 2024 · 2 comments

Comments

@mincong-h
Copy link
Owner

Traceback (most recent call last):
  File "/usr/local/bin/finance-toolkit", line 33, in <module>
    sys.exit(load_entry_point('finance-toolkit==1.4.0', 'console_scripts', 'finance-toolkit')())
  File "/usr/local/lib/python3.10/site-packages/finance_toolkit-1.4.0-py3.10.egg/finance_toolkit/__main__.py", line 76, in main
  File "/usr/local/lib/python3.10/site-packages/finance_toolkit-1.4.0-py3.10.egg/finance_toolkit/tx.py", line 247, in move
  File "/usr/local/lib/python3.10/site-packages/finance_toolkit-1.4.0-py3.10.egg/finance_toolkit/pipeline.py", line 45, in run
  File "/usr/local/lib/python3.10/site-packages/pandas-1.3.5-py3.10-linux-x86_64.egg/pandas/core/series.py", line 4357, in apply
    return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
  File "/usr/local/lib/python3.10/site-packages/pandas-1.3.5-py3.10-linux-x86_64.egg/pandas/core/apply.py", line 1043, in apply
    return self.apply_standard()
  File "/usr/local/lib/python3.10/site-packages/pandas-1.3.5-py3.10-linux-x86_64.egg/pandas/core/apply.py", line 1098, in apply_standard
    mapped = lib.map_infer(
  File "pandas/_libs/lib.pyx", line 2859, in pandas._libs.lib.map_infer
  File "/usr/local/lib/python3.10/site-packages/finance_toolkit-1.4.0-py3.10.egg/finance_toolkit/pipeline.py", line 45, in <lambda>
  File "pandas/_libs/tslibs/nattype.pyx", line 75, in pandas._libs.tslibs.nattype._make_error_func.f
ValueError: NaTType does not support strftime
@mincong-h
Copy link
Owner Author

I think this is because there is a new row appeared in Revolut's account statement, which reverted the previous transaction, and the completed date is not defined (the column right after the started date)

CARD_PAYMENT,Current,2024-04-11 16:32:35,,Amazon Web Services,-1.00,0.00,EUR,REVERTED,

@mincong-h
Copy link
Owner Author

workaround: fill that date using the started date

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