Skip to content

module not working on python 3.12++ #401

@diniemasjuki

Description

@diniemasjuki

greetings everywone,
has anybody fixes the issue of CGI module ?

this is the error regarding python missing CGI

Installing ecommerce_integrations...
Updating DocTypes for ecommerce_integrations: [========== ] 26%An error occurred while installing ecommerce_integrations: Module import failed for Shopify Setting, the DocType you're trying to open might be deleted.
Error: No module named 'cgi'
Traceback with variables (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 508, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = CliCtxObj(force=False, profile=False, sites=['biz.rpwp.my'], verbose=False)
apps = ('ecommerce_integrations')
force = True
install_app = <function install_app at 0x7419529ac040>
filelock = <function filelock at 0x741953bbdc70>
exit_code = 0
site = 'biz.rpwp.my'
app = 'ecommerce_integrations'
err = Module import failed for Shopify Setting, the DocType you're trying to open might be deleted.
Error: No module named 'cgi'
File "apps/frappe/frappe/installer.py", line 321, in install_app
sync_for(name, force=force, reset_permissions=True)
name = 'ecommerce_integrations'
verbose = False
set_as_patched = True
force = True
sync_jobs = <function sync_jobs at 0x741951341f30>
sync_for = <function sync_for at 0x741951343480>
sync_customizations = <function sync_customizations at 0x741953c2f8a0>
sync_fixtures = <function sync_fixtures at 0x741951343950>
installed_apps = ['frappe', 'erpnext', 'hrms', 'print_designer', 'payments']
app = 'frappe/erpnext'
required_app = 'erpnext'
other_class_overrides = {'Employee': ['hrms.overrides.employee_master.EmployeeMaster'], 'Timesheet': ['hrms.overrides.employee_timesheet.EmployeeTimesheet'], 'Payment Entry': ['hrms.overrides.employee_payment_entry.EmployeePaymentEntry'], 'Project': ['hrms.overrides.employee_project.EmployeeProject'], 'Print Format': ['print_designer.print_designer.overrides.print_format.PDPrintFormat']}
app_hooks = {'app_color': ['grey'], 'app_description': ['Ecommerce integrations for ERPNext'], 'app_email': ['developers@frappe.io'], 'app_icon': ['octicon octicon-file-directory'], 'app_license': ['GNU GPL v3.0'], 'app_name': ['ecommerce_integrations'], 'app_publisher': ['Frappe'], 'app_title': ['Ecommerce Integrations'], 'app_version': ['1.17.0'], 'before_tests': ['ecommerce_integrations.utils.before_test.before_tests'], 'before_uninstall': ['ecommerce_integrations.uninstall.before_uninstall'], 'default_log_clearing_doctypes': {'Ecommerce Integration Log': [120]}, 'doc_events': {'Item': {'after_insert': ['ecommerce_integrations.shopify.product.upload_erpnext_item'], 'on_update': ['ecommerce_integratio...te_shipping_package_status'], 'weekly': [], 'monthly': [], 'cron': {'*/5 * * * *': ['ecommerce_integrations.unicommerce.order.sync_new_orders', 'ecommerce_integrations.unicommerce.inventory.update_inventory_on_unicommerce', 'ecommerce_integrations.unicommerce.delivery_note.prepare_delivery_note']}}}
File "apps/frappe/frappe/model/sync.py", line 131, in sync_for
imported = import_file_by_path(
app_name = 'ecommerce_integrations'
force = True
reset_permissions = True
files = ['apps/ecommerce_integrations/ecommerce_integrations/ecommerce_integrations/doctype/pick_list_sales_order_details/pick_list_sales_order_details.json', 'apps/ecommerce_integrations/ecommerce_integrations/ecommerce_integrations/doctype/ecommerce_item/ecommerce_item.json', 'apps/ecommerce_integrations/ecommerce_integrations/ecommerce_integrations/doctype/ecommerce_integration_log/ecommerce_integration_log.json', 'apps/ecommerce_integrations/ecommerce_integrations/shopify/doctype/shopify_tax_account/shopify_tax_account.json', 'apps/ecommerce_integrations/ecommerce
...nt_manifest.json', 'apps/ecommerce_integrations/ecommerce_integrations/amazon/doctype/amazon_fields_map/amazon_fields_map.json', 'apps/ecommerce_integrations/ecommerce_integrations/amazon/doctype/amazon_sp_api_settings/amazon_sp_api_settings.json']
module_name = 'amazon'
folder = 'apps/ecommerce_integrations/ecommerce_integrations/amazon'
app_level_folders = ['desktop_icon', 'workspace_sidebar', 'sidebar_item_group']
folder_name = 'sidebar_item_group'
directory_path = 'apps/ecommerce_integrations/ecommerce_integrations/sidebar_item_group'
doc_path = 'apps/ecommerce_integrations/ecommerce_integrations/shopify/doctype/shopify_setting/shopify_setting.json'
l = 23
i = 6
imported = True
File "apps/frappe/frappe/modules/import_file.py", line 144, in import_file_by_path
import_doc(
path = 'apps/ecommerce_integrations/ecommerce_integrations/shopify/doctype/shopify_setting/shopify_setting.json'
force = True
data_import = False
pre_process = None
ignore_version = True
reset_permissions = True
docs = [{'actions': [], 'creation': '2021-04-13 13:30:54.909583', 'doctype': 'DocType', 'editable_grid': 1, 'engine': 'InnoDB', 'fields': [{'default': '0', 'fieldname': 'enable_shopify', 'fieldtype': 'Check', 'label': 'Enable Shopify', 'doctype': 'DocField'}, {'fieldname': 'column_break_4', 'fieldtype': 'Column Break', 'doctype': 'DocField'}, {'fieldname': 'section_break_2', 'fieldtype': 'Section Break', 'label': 'Authentication Details', 'doctype': 'DocField'}, {'description': 'eg: frappe.myshopify.com', 'fieldname': 'shopify_url', 'fieldtype': 'Data', 'in_list_view': 1, 'label': 'Shop URL', 'mandatory_depends_on': 'eval:doc.enable_shopify', 'doctype': 'DocField'}, {'fieldname': 'column_break_3...me': 'Shopify Setting', 'owner': 'Administrator', 'permissions': [{'create': 1, 'delete': 1, 'email': 1, 'print': 1, 'read': 1, 'role': 'System Manager', 'share': 1, 'write': 1, 'doctype': 'DocPerm'}], 'sort_field': 'modified', 'sort_order': 'DESC', 'states': [], 'track_changes': 1, '__islocal': 1}]
calculated_hash = 'd209225930741fde6e5a8bd8c6e44972'
imported = False
doc = {'actions': [], 'creation': '2021-04-13 13:30:54.909583', 'doctype': 'DocType', 'editable_grid': 1, 'engine': 'InnoDB', 'fields': [{'default': '0', 'fieldname': 'enable_shopify', 'fieldtype': 'Check', 'label': 'Enable Shopify', 'doctype': 'DocField'}, {'fieldname': 'column_break_4', 'fieldtype': 'Column Break', 'doctype': 'DocField'}, {'fieldname': 'section_break_2', 'fieldtype': 'Section Break', 'label': 'Authentication Details', 'doctype': 'DocField'}, {'description': 'eg: frappe.myshopify.com', 'fieldname': 'shopify_url', 'fieldtype': 'Data', 'in_list_view': 1, 'label': 'Shop URL', 'mandatory_depends_on': 'eval:doc.enable_shopify', 'doctype': 'DocField'}, {'fieldname': 'column_break_3', '...ame': 'Shopify Setting', 'owner': 'Administrator', 'permissions': [{'create': 1, 'delete': 1, 'email': 1, 'print': 1, 'read': 1, 'role': 'System Manager', 'share': 1, 'write': 1, 'doctype': 'DocPerm'}], 'sort_field': 'modified', 'sort_order': 'DESC', 'states': [], 'track_changes': 1, '__islocal': 1}
db_modified_timestamp = None
is_db_timestamp_latest = None
File "apps/frappe/frappe/modules/import_file.py", line 238, in import_doc
doc.insert()
docdict = {'actions': [], 'creation': '2021-04-13 13:30:54.909583', 'doctype': 'DocType', 'editable_grid': 1, 'engine': 'InnoDB', 'fields': [{'default': '0', 'fieldname': 'enable_shopify', 'fieldtype': 'Check', 'label': 'Enable Shopify', 'doctype': 'DocField'}, {'fieldname': 'column_break_4', 'fieldtype': 'Column Break', 'doctype': 'DocField'}, {'fieldname': 'section_break_2', 'fieldtype': 'Section Break', 'label': 'Authentication Details', 'doctype': 'DocField'}, {'description': 'eg: frappe.myshopify.com', 'fieldname': 'shopify_url', 'fieldtype': 'Data', 'in_list_view': 1, 'label': 'Shop URL', 'mandatory_depends_on': 'eval:doc.enable_shopify', 'doctype': 'DocField'}, {'fieldname': 'column_break_3', '...ame': 'Shopify Setting', 'owner': 'Administrator', 'permissions': [{'create': 1, 'delete': 1, 'email': 1, 'print': 1, 'read': 1, 'role': 'System Manager', 'share': 1, 'write': 1, 'doctype': 'DocPerm'}], 'sort_field': 'modified', 'sort_order': 'DESC', 'states': [], 'track_changes': 1, '__islocal': 1}
data_import = False
pre_process = None
ignore_version = True
reset_permissions = True
path = 'apps/ecommerce_integrations/ecommerce_integrations/shopify/doctype/shopify_setting/shopify_setting.json'
controller = frappe.core.doctype.doctype.doctype.DocType
doc = DocType (Shopify Setting)
File "apps/frappe/frappe/model/document.py", line 474, in insert
self.run_post_save_methods()
self = DocType (Shopify Setting)
ignore_permissions = None
ignore_links = None
ignore_if_duplicate = False
ignore_mandatory = None
set_name = None
set_child_names = True
d = DocPerm (gr8ngdebuj)
File "apps/frappe/frappe/model/document.py", line 1375, in run_post_save_methods
self.run_method("on_update")
self = DocType (Shopify Setting)
File "apps/frappe/frappe/model/document.py", line 1181, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
self = DocType (Shopify Setting)
method = 'on_update'
args = ()
kwargs = {}
fn = <function Document.run_method..fn at 0x74193c41fb60>
File "apps/frappe/frappe/model/document.py", line 1578, in composer
return composed(self, method, args, **kwargs)
self = DocType (Shopify Setting)
args = ()
kwargs = {}
hooks = [<function build_domain_restricted_doctype_cache at 0x7419542426c0>, <function clear_doctype_notifications at 0x74193c5871c0>, <function process_workflow_actions at 0x74193c59be20>, <function attach_files_to_document at 0x7419542f0d50>, <function apply at 0x74193c5bada0>, <function update_due_date at 0x74193c5bae50>, <function apply_permissions_for_non_standard_user_type at 0x74193c5c8e00>, <function make_perm_log at 0x74193c5c8eb0>, <function update_doc_index at 0x74193ce44510>]
method = 'on_update'
doc_events = {'
': {'on_update': ['frappe.desk.notifications.clear_doctype_notifications', 'frappe.workflow.doctype.workflow_action.workflow_action.process_workflow_actions', 'frappe.core.doctype.file.utils.attach_files_to_document', 'frappe.automation.doctype.assignment_rule.assignment_rule.apply', 'frappe.automation.doctype.assignment_rule.assignment_rule.update_due_date', 'frappe.core.doctype.user_type.user_type.apply_permissions_for_non_standard_user_type', 'frappe.core.doctype.permission_log.permission_log.make_perm_log', 'frappe.search.sqlite_search.update_doc_index'], 'after_rename': ['frappe.desk.notifications.clear_doctype_notifications'], 'on_cancel': ['frappe.desk.notifications.clear_doctype_n...yee_master.update_employee_transfer'], 'after_delete': ['hrms.overrides.employee_master.publish_update']}, 'Project': {'validate': ['hrms.controllers.employee_boarding_controller.update_employee_boarding_status']}, 'Task': {'on_update': ['hrms.controllers.employee_boarding_controller.update_task']}}
handler = 'frappe.search.sqlite_search.update_doc_index'
composed = <function Document.hook..compose..runner at 0x74193c3be140>
compose = <function Document.hook..compose at 0x74193c48bed0>
f = <function Document.run_method..fn at 0x74193c41fb60>
File "apps/frappe/frappe/model/document.py", line 1556, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
self = DocType (Shopify Setting)
method = 'on_update'
args = ()
kwargs = {}
add_to_return_value = <function Document.hook..add_to_return_value at 0x74193c4885c0>
fn = <function Document.run_method..fn at 0x74193c41fb60>
hooks = (<function build_domain_restricted_doctype_cache at 0x7419542426c0>, <function clear_doctype_notifications at 0x74193c5871c0>, <function process_workflow_actions at 0x74193c59be20>, <function attach_files_to_document at 0x7419542f0d50>, <function apply at 0x74193c5bada0>, <function update_due_date at 0x74193c5bae50>, <function apply_permissions_for_non_standard_user_type at 0x74193c5c8e00>, <function make_perm_log at 0x74193c5c8eb0>, <function update_doc_index at 0x74193ce44510>)
File "apps/frappe/frappe/model/document.py", line 1178, in fn
return method_object(*args, **kwargs)
self = DocType (Shopify Setting)
args = ()
kwargs = {}
method_object = <bound method DocType.on_update of <DocType: doctype=DocType Shopify Setting>>
method = 'on_update'
File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 559, in on_update
self.run_module_method("on_doctype_update")
self = DocType (Shopify Setting)
allow_doctype_export = False
File "apps/frappe/frappe/core/doctype/doctype/doctype.py", line 657, in run_module_method
module = load_doctype_module(self.name, self.module)
self = DocType (Shopify Setting)
method = 'on_doctype_update'
load_doctype_module = <function load_doctype_module at 0x741953c343b0>
File "apps/frappe/frappe/modules/utils.py", line 308, in load_doctype_module
raise ImportError(msg) from e
doctype = 'Shopify Setting'
module = 'shopify'
prefix = ''
suffix = ''
app = 'ecommerce_integrations'
key = ********
module_name = 'ecommerce_integrations.shopify.doctype.shopify_setting.shopify_setting'
msg = 'Module import failed for Shopify Setting, the DocType you're trying to open might be deleted.
Error: No module named 'cgi''
builtins.ImportError: Module import failed for Shopify Setting, the DocType you're trying to open might be deleted.
Error: No module named 'cgi'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions