frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
19.73k stars 7k forks source link

when using Opening Invoice creation Import exception seen #41838

Open Pankajo76 opened 2 months ago

Pankajo76 commented 2 months ago

Information about bug

1) try downloading TEMPLATE in OPENING INVOICE CREATION IMPORT menu 2) exception seen

Module

accounts

Version

ERPnext Version 15

Uploading import invoice tool error.mov…

Installation method

None

Relevant log output / Stack trace / Full Error Message.

Server Error
Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 115, 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/frappe/frappe/core/doctype/data_import/data_import.py", line 171, in download_template
    e = Exporter(
        ^^^^^^^^^
  File "apps/frappe/frappe/core/doctype/data_import/exporter.py", line 50, in __init__
    self.add_data()
  File "apps/frappe/frappe/core/doctype/data_import/exporter.py", line 228, in add_data
    self.csv_array += self.data
  File "apps/frappe/frappe/core/doctype/data_import/exporter.py", line 118, in get_data_to_export
    for doc in data:
  File "apps/frappe/frappe/core/doctype/data_import/exporter.py", line 163, in get_data_as_docs
    parent_data = frappe.db.get_list(
                  ^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/database/database.py", line 765, in get_list
    return frappe.get_list(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/__init__.py", line 2032, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/db_query.py", line 185, in execute
    self.columns = self.get_table_columns()
                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/db_query.py", line 546, in get_table_columns
    return get_table_columns(self.doctype)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/model/meta.py", line 73, in get_table_columns
    return frappe.db.get_table_columns(doctype)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/database/database.py", line 1197, in get_table_columns
    raise self.TableMissingError("DocType", doctype)
pymysql.err.ProgrammingError: ('DocType', 'Opening Invoice Creation Tool')
ljain112 commented 1 month ago

Not able to replicate the issue. Can you share App versions and also try bench migrate?