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

14.0_txt_xlsx_better_error_handling #613

Conversation

saravanabalagi
Copy link

@saravanabalagi saravanabalagi commented Jul 20, 2023

Currently any problem during parsing is reported as "File format not supported, did you install the Odoo module". Related issue: #603

  • Handle empty str* in amount as 0, prevents Decimal Conversion error
  • Show more common file content problems: Key and Value error
  • For all other errors, report as parsing error

*some banks provide CSVs with only debit or credit filled while leaving the other empty

Prevents Decimal Conversion error
Show more common file content problems: Key and Value error
For all other error, report parsing error
@OCA-git-bot
Copy link
Contributor

Hi @alexey-pelykh,
some modules you are maintaining are being modified, check this out!

@saravanabalagi saravanabalagi force-pushed the 14.0_txt_xlsx_better_error_handling branch from 0273d6b to 1050ebe Compare July 20, 2023 01:27
@saravanabalagi saravanabalagi force-pushed the 14.0_txt_xlsx_better_error_handling branch from 1050ebe to 25de694 Compare July 20, 2023 01:34
Print error for BaseException
Add tests and fixtures
@saravanabalagi saravanabalagi marked this pull request as ready for review July 20, 2023 04:34
@saravanabalagi
Copy link
Author

Catching decimal exception in the inner function is necessary, as catching it in parent similar to ValueError will not provide any details of the original value that was attempted to be parsed. Args for decimal exceptions have only the signal flags [1, 2, 3].

@cvinh
Copy link

cvinh commented Aug 23, 2023

Hello @saravanabalagi did you check this PR : #519
It looks like it's simpler

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 24, 2023
@github-actions github-actions bot closed this Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants