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

Healthcare version 15 installs error #393

Open
1 task done
alishirini opened this issue Feb 18, 2024 · 3 comments
Open
1 task done

Healthcare version 15 installs error #393

alishirini opened this issue Feb 18, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@alishirini
Copy link

Information about bug

Hello

We have frappe 15 with ERP next 14,
Installation is normally done, but when try to assign it to a site we find an error!

Screenshot 2024-02-18 121546

Screenshot 2024-02-18 121609

Screenshot 2024-02-18 121627

Module

Setup / Configuration

Version

Frappe 15
ERP Next 14
Healthcare 15

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

App erpnext already installed

Installing healthcare...
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/opt/bench/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
    main()
  File "/opt/bench/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
    click.Group(commands=commands)(prog_name="bench")
  File "/opt/bench/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/opt/bench/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/opt/bench/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/bench/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/bench/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/bench/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/bench/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/bench/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/opt/bench/frappe-bench/apps/frappe/frappe/commands/site.py", line 462, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "/opt/bench/frappe-bench/apps/frappe/frappe/installer.py", line 306, in install_app
    frappe.get_attr(after_install)()
  File "/opt/bench/frappe-bench/apps/healthcare/healthcare/setup.py", line 136, in setup_healthcare
    if frappe.db.exists("Medical Department", "Cardiology"):
  File "/opt/bench/frappe-bench/apps/frappe/frappe/database/database.py", line 1055, in exists
    return self.get_value(dt, dn, ignore=True, cache=cache, order_by=None)
  File "/opt/bench/frappe-bench/apps/frappe/frappe/database/database.py", line 466, in get_value
    result = self.get_values(
  File "/opt/bench/frappe-bench/apps/frappe/frappe/database/database.py", line 563, in get_values
    out = self._get_values_from_table(
  File "/opt/bench/frappe-bench/apps/frappe/frappe/database/database.py", line 827, in _get_values_from_table
    return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
  File "/opt/bench/frappe-bench/apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
  File "/opt/bench/frappe-bench/apps/frappe/frappe/database/database.py", line 245, in sql
    traceback.print_stack()
Error in query:
('SELECT `name` FROM `tabMedical Department` WHERE `name`=%(param1)s LIMIT 1', {'param1': 'Cardiology'})
An error occurred while installing healthcare: Module import failed for Medical Department, the DocType you're trying to open might be deleted.<br> Error: No module named 'frappe.core.doctype.medical_department'
Traceback (most recent call last):
  File "apps/frappe/frappe/modules/utils.py", line 241, in load_doctype_module
    doctype_python_modules[key] = frappe.get_module(module_name)
  File "apps/frappe/frappe/__init__.py", line 1408, in get_module
    return importlib.import_module(modulename)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'frappe.core.doctype.medical_department'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 462, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "apps/frappe/frappe/installer.py", line 306, in install_app
    frappe.get_attr(after_install)()
  File "apps/healthcare/healthcare/setup.py", line 144, in setup_healthcare
    create_custom_records()
  File "apps/healthcare/healthcare/setup.py", line 198, in create_custom_records
    create_medical_departments()
  File "apps/healthcare/healthcare/setup.py", line 238, in create_medical_departments
    mediacal_department = frappe.new_doc("Medical Department")
  File "apps/frappe/frappe/__init__.py", line 1120, in new_doc
    new_doc = get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
  File "apps/frappe/frappe/model/create_new.py", line 22, in get_new_doc

Code of Conduct

  • I agree to follow this project's Code of Conduct
@alishirini alishirini added the bug Something isn't working label Feb 18, 2024
@akashkrishna619
Copy link
Collaborator

akashkrishna619 commented Feb 20, 2024

@alishirini can you pull healthcare app and try again?

@alishirini
Copy link
Author

@alishirini can you pull healthcare app and try again?

I will try that, but I prefer to install health care besides my custom app!

Do you think something is conflicted or dropped?

@akashkrishna619
Copy link
Collaborator

@alishirini can you pull healthcare app and try again?

I will try that, but I prefer to install health care besides my custom app!

Do you think something is conflicted or dropped?

this issue was fixed few weeks back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants