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

Getting Error:builtins.ImportError: Module import failed for Wiki Page, the DocType you're trying to open might be deleted. Error: No module named 'frappe.core.doctype.wiki_page' while install wiki in the latest version of Frappe #289

Closed
Hamza-ALsaqaf opened this issue Oct 15, 2024 · 1 comment

Comments

@Hamza-ALsaqaf
Copy link

Installing wiki...
An error occurred while installing wiki: Module import failed for Wiki Page, the DocType you're trying to open might be deleted.
Error: No module named 'frappe.core.doctype.wiki_page'
Traceback with variables (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 452, in install_app
_install_app(app, verbose=context.verbose, force=force)
context = {'sites': ['site1.local'], 'force': False, 'verbose': False, 'profile': False}
apps = ('wiki',)
force = False
_install_app = <function install_app at 0x7f1c848d1260>
filelock = <function filelock at 0x7f1c848a3060>
exit_code = 0
site = 'site1.local'
app = 'wiki'
err = ImportError("Module import failed for Wiki Page, the DocType you're trying to open might be deleted.\nError: No module named 'frappe.core.doctype.wiki_page'")
File "apps/frappe/frappe/installer.py", line 322, in install_app
frappe.get_attr(after_install)()
name = 'wiki'
verbose = False
set_as_patched = True
force = False
sync_jobs = <function sync_jobs at 0x7f1c8470bd80>
sync_for = <function sync_for at 0x7f1c8471cb80>
sync_customizations = <function sync_customizations at 0x7f1c86011260>
sync_fixtures = <function sync_fixtures at 0x7f1c8471cea0>
app_hooks = {'add_to_apps_screen': [{'name': 'wiki', 'logo': '/assets/wiki/images/wiki-logo.png', 'title': 'Wiki', 'route': '/app/wiki'}], 'after_install': ['wiki.install.after_install'], 'after_migrate': ['wiki.wiki.doctype.wiki_page.search.rebuild_index_in_background'], 'app_color': ['grey'], 'app_description': ['Simple Wiki App'], 'app_email': ['[email protected]'], 'app_icon': ['octicon octicon-file-directory'], 'app_license': ['MIT'], 'app_name': ['wiki'], 'app_publisher': ['Frappe'], 'app_title': ['Wiki'], 'page_renderer': ['wiki.wiki.doctype.wiki_page.wiki_renderer.WikiPageRenderer'], 'scheduler_events': {'cron': {'*/15 * * * *': ['wiki.wiki.doctype.wiki_page.search.rebuild_index_in_background']}}, 'website_route_rules': [{'from_route': '/path:wiki_page/edit-wiki', 'to_route': '/edit'}, {'from_route': '/path:wiki_page/new-wiki', 'to_route': '/new'}, {'from_route': '/path:wiki_page/revisions', 'to_route': '/revisions'}]}
installed_apps = ['frappe', 'erpnext', 'hrms', 'acs']
after_install = 'wiki.install.after_install'
File "apps/wiki/wiki/install.py", line 10, in after_install
page = frappe.new_doc("Wiki Page")
File "apps/frappe/frappe/init.py", line 1197, in new_doc
new_doc = get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
doctype = 'Wiki Page'
parent_doc = None
parentfield = None
as_dict = False
kwargs = {}
get_new_doc = <function get_new_doc at 0x7f1c83c81260>
File "apps/frappe/frappe/model/create_new.py", line 22, in get_new_doc
frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
doctype = 'Wiki Page'
parent_doc = None
parentfield = None
as_dict = False
File "apps/frappe/frappe/model/create_new.py", line 35, in make_new_doc
doc = frappe.get_doc({"doctype": doctype, "__islocal": 1, "owner": frappe.session.user, "docstatus": 0})
doctype = 'Wiki Page'
File "apps/frappe/frappe/init.py", line 1340, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
args = ({'doctype': 'Wiki Page', '__islocal': 1, 'owner': 'Administrator', 'docstatus': 0},)
kwargs = {}
frappe = <module 'frappe' from 'apps/frappe/frappe/init.py'>
File "apps/frappe/frappe/model/document.py", line 83, in get_doc
controller = get_controller(doctype)
args = ({'doctype': 'Wiki Page', '__islocal': 1, 'owner': 'Administrator', 'docstatus': 0},)
kwargs = {'doctype': 'Wiki Page', '__islocal': 1, 'owner': 'Administrator', 'docstatus': 0}
doctype = 'Wiki Page'
File "apps/frappe/frappe/model/base_document.py", line 70, in get_controller
site_controllers[doctype] = import_controller(doctype)
doctype = 'Wiki Page'
site_controllers = {'Module Def': <class 'frappe.core.doctype.module_def.module_def.ModuleDef'>, 'DocField': <class 'frappe.core.doctype.docfield.docfield.DocField'>, 'DocPerm': <class 'frappe.core.doctype.docperm.docperm.DocPerm'>, 'DocType Link': <class 'frappe.core.doctype.doctype_link.doctype_link.DocTypeLink'>, 'System Settings': <class 'frappe.core.doctype.system_settings.system_settings.SystemSettings'>, 'Notification Settings': <class 'frappe.desk.doctype.notification_settings.notification_settings.NotificationSettings'>, 'DefaultValue': <class 'frappe.core.doctype.defaultvalue.defaultvalue.DefaultValue'>, 'Payment Reconciliation': <class 'erpnext.accounts.doctype.payment_reconciliation.payment_reconciliation.PaymentReconciliation'>, 'Customize Form': <class 'frappe.custom.doctype.customize_form.customize_form.CustomizeForm'>, 'DocType Action': <class 'frappe.core.doctype.doctype_action.doctype_action.DocTypeAction'>, 'DocType State': <class 'frappe.core.doctype.doctype_state.doctype_state.DocTyp...
File "apps/frappe/frappe/model/base_document.py", line 95, in import_controller
module = load_doctype_module(doctype, module_name)
doctype = 'Wiki Page'
Document = <class 'frappe.model.document.Document'>
NestedSet = <class 'frappe.utils.nestedset.NestedSet'>
module_name = 'Core'
doctype_info = None
module_path = None
class_overrides = {'Address': ['erpnext.accounts.custom.address.ERPNextAddress'], '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']}
File "apps/frappe/frappe/modules/utils.py", line 258, in load_doctype_module
raise ImportError(msg) from e
doctype = 'Wiki Page'
module = 'Core'
prefix = ''
suffix = ''
app = 'frappe'
key = ********
module_name = 'frappe.core.doctype.wiki_page.wiki_page'
msg = "Module import failed for Wiki Page, the DocType you're trying to open might be deleted.\nError: No module named 'frappe.core.doctype.wiki_page'"
builtins.ImportError: Module import failed for Wiki Page, the DocType you're trying to open might be deleted.
Error: No module named 'frappe.core.doctype.wiki_page'

image

@BreadGenie
Copy link
Member

you can do a force install of Wiki to fix this

duplicate of #264

@BreadGenie BreadGenie closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
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

2 participants