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

fix: error message in coa importer #42590

Merged
merged 1 commit into from
Aug 13, 2024
Merged

Conversation

ljain112
Copy link
Contributor

@ljain112 ljain112 commented Aug 2, 2024

The current validation process only checks for rows with more than 8 columns. This limited check does not account for less than 8 columns, which can cause issues.

Frappe Internal Issue: https://support.frappe.io/app/hd-ticket/19638

Traceback


Traceback (most recent call last):

  File "apps/frappe/frappe/app.py", line 114, in application

    response = frappe.api.handle(request)

               ^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "apps/frappe/frappe/api/__init__.py", line 49, in handle

    data = endpoint(**arguments)

           ^^^^^^^^^^^^^^^^^^^^^

  File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call

    return frappe.handler.handle()

           ^^^^^^^^^^^^^^^^^^^^^^^

  File "apps/frappe/frappe/handler.py", line 49, in handle

    data = execute_cmd(cmd)

           ^^^^^^^^^^^^^^^^

  File "apps/frappe/frappe/handler.py", line 85, in execute_cmd

    return frappe.call(method, **frappe.form_dict)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "apps/frappe/frappe/__init__.py", line 1768, in call

    return fn(*args, **newargs)

           ^^^^^^^^^^^^^^^^^^^^

  File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper

    return func(*args, **kwargs)

           ^^^^^^^^^^^^^^^^^^^^^

  File "apps/erpnext/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py", line 175, in get_coa

    forest = build_forest(data)

             ^^^^^^^^^^^^^^^^^^

  File "apps/erpnext/erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py", line 239, in build_forest

    (

ValueError: not enough values to unpack (expected 8, got 6)```


Before:
image

After:
image

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Aug 2, 2024
@ruthra-kumar ruthra-kumar self-assigned this Aug 6, 2024
@ruthra-kumar ruthra-kumar merged commit 4426122 into frappe:develop Aug 13, 2024
17 checks passed
ruthra-kumar added a commit that referenced this pull request Aug 13, 2024
…-42590

fix: error message in coa importer (backport #42590)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-15-hotfix needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants