Error when merging two customers

I get the following error when i try to merge any entries.

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 62, in application
    response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 22, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 53, in execute_cmd
    return, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 939, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 46, in rename_doc
    update_link_field_values(link_fields, old, new, doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 161, in update_link_field_values
    single_doc = frappe.get_doc(field['parent'])
  File "/home/frappe/frappe-bench/apps/frappe/frappe/", line 638, in get_doc
    return frappe.model.document.get_doc(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 66, in get_doc
    controller = get_controller(doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/", line 36, in get_controller
    module = load_doctype_module(doctype, module_name)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/", line 177, in load_doctype_module
    app = get_module_app(module)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/", line 200, in get_module_app
    return frappe.local.module_app[scrub(module)]
KeyError: u'hotels'

What version you are using?
And what do you need to do?
The title is saying: Error when merging two customers and the body of your post is saying error when I try to merge any entries! So can you please explain what do you need to do?


Im on version 10.1.53.
This error shows up whenever i try to merge two entries (customer, items, etc.)

You can not count or add or subtract tomato from cucumber.
What do you mean by merging two entries? Like what?
Customer is something different than Item, so what merge you need to do?

Well, generally speaking: merge means combine and also it means mix . For example: we have company A that is working in steal structure and company B that is working in Steal manufacturing, if we need to merge them (as management), then we need to have company C which is doing steal manufacturing and structuring.

That is why you need to mention step by step and at which screen, what are you trying to do and what is your target?


1 Like

Yes i mean merging two customers or merging two items.

This field is causing problem. Check where this is.

I do not have such a field i have the distribution and retail modules only

Isn’t hotels a module ?

EDIT : Yes it is. This module is causing you a problem.

Alright, any ideas as to how i could disable it

EDIT: I do not have it installed how do i remove this error

it seems some patches have not installed properly.

bench switch-to-master frappe erpnext
bench update --requirements
bench update --patch
bench retry-upgrade
1 Like

It did not work

What part did not work? Please elaborate or nobody will able to help.

Sorry for that
The commands worked but the error is still there

You seems to be running customization or other modules?

./env/bin/pip install --upgrade scrubadub

In your next reply give detailed output of command in code blocks for help, if this does not solves your issue.

The output of the command

frappe@erpnext-production:~/frappe-bench$ ./env/bin/pip install --upgrade scrubadub
    Collecting scrubadub
    Collecting textblob==0.10.0 (from scrubadub)
      Using cached
    Collecting phonenumbers (from scrubadub)
      Using cached
    Collecting argcomplete (from scrubadub)
      Using cached
    Collecting nltk>=3.0 (from textblob==0.10.0->scrubadub)
    Requirement already satisfied, skipping upgrade: six in ./env/lib/python2.7/site-packages (from nltk>=3.0->textblob==0.10.0->scrubadub) (1.11.0)
    Installing collected packages: nltk, textblob, phonenumbers, argcomplete, scrubadub
    Successfully installed argcomplete-1.9.4 nltk-3.3 phonenumbers-8.9.14 scrubadub-1.2.0 textblob-0.10.0

The same error shows up but now only when merging or renaming customers.

Then run these again,

I tried running them again there is no error when executing the commands.
But the error hasn’t gone yet.

So after a lot of time researching the error points to the hotels module missing.
But there is no module in the system named hotels so how can i remove this error.