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

Setup Wizard Fails: while setting defaults we get the error "Could not find Default Company: <Company Name>" #26388

Open
mujeerhashmi opened this issue May 9, 2024 · 1 comment
Labels

Comments

@mujeerhashmi
Copy link
Contributor

Description of the issue

Context information (for bug reports)

Output of bench version

erpnext 15.22.2
frappe 15.26.0
hrms 15.20.3

Steps to reproduce the issue

  1. Create new-site on bench
  2. Access the site and the setup wizard will start
  3. Enter all the setup details and finish

Observed result

Could not find Default Company:

Expected result

Setup wizard should complete

Stacktrace / full error message

File "apps/frappe/frappe/app.py", line 110, 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/desk/page/setup_wizard/setup_wizard.py", line 61, in setup_complete
    return process_setup_stages(stages, args)
  File "apps/frappe/frappe/desk/page/setup_wizard/setup_wizard.py", line 81, in process_setup_stages
    task.get("fn")(task.get("args"))
  File "apps/erpnext/erpnext/setup/setup_wizard/setup_wizard.py", line 59, in setup_defaults
    fixtures.install_defaults(frappe._dict(args))
  File "apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py", line 453, in install_defaults
    set_global_defaults(args)
  File "apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py", line 471, in set_global_defaults
    global_defaults.save()
  File "apps/frappe/frappe/model/document.py", line 337, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 372, in _save
    self._validate_links()
  File "apps/frappe/frappe/model/document.py", line 930, in _validate_links
    frappe.throw(_("Could not find {0}").format(msg), frappe.LinkValidationError)
  File "apps/frappe/frappe/__init__.py", line 645, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 610, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 561, in _raise_exception
    raise exc
frappe.exceptions.LinkValidationError: Could not find Default Company: 

Additional information

OS version / distribution, Frappe install method, etc.

@karanwilson
Copy link

karanwilson commented May 10, 2024

Hi @mujeerhashmi,
I just installed a fresh site with the following app versions:-

ERPNext: v15.23.0 (version-15)
Frappe Framework: v15.26.0 (version-15)
Frappe HR: v15.20.3 (version-15)

The Wizard completed successfully without any errors.

Please run:
bench --site site-name migrate
before starting the site for the first time.

@nabinhait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants