ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Error while installing custom app on erpnext multi-tenant server


Hello everyone
i am trying to install custom app on erpnext multi-tenent server but getting error
i am trying by command.

  1. bench get-app application_name {{ source_link }}
    2.bench --site site_name install-app application_name

but am getting following error while installing app on website
Installing opcart…

Traceback (most recent call last):
File “/usr/lib/python2.7/”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/”, line 72, in _run_code
exec code in run_globals
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 97, in
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 18, in main
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 716, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 696, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/”, line 25, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/”, line 168, in install_app
_install_app(app, verbose=context.verbose)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 145, in install_app
sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 56, in sync_for
reset_permissions=reset_permissions, for_sync=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/”, line 65, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/”, line 100, in import_doc
doc = frappe.get_doc(docdict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 723, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 69, in get_doc
return controller(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 113, in init
super(Document, self).init(kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 54, in init
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 77, in update
self.set(key, value)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 124, in set
self.extend(key, value)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 161, in extend
self.append(key, v)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 155, in append, str(type(value))[1:-1], value)
ValueError: Document for field “field_order” attached to child table of “OnePageCart” must be a dict or BaseDocument, not type ‘unicode’ (enable_opc)

Thank you


Seems something wrong in doctypes.json file. Save doctype again to generate appropriate json.


Thanks for reply. i deleted docktype folder( because i need to deal with only custom website for home page) but got AttributeError: ‘WebApplicationClient’ object has no attribute ‘populate_token_attributes’.
for cross check i tried to create custom app on server and install it on website by following command.
bench new-app myapp
bench --site install-app myapp
then i got same error.

File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests_oauthlib/”, line 69, in init
self.token = token or {}
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests_oauthlib/”, line 119, in token
AttributeError: ‘WebApplicationClient’ object has no attribute ‘populate_token_attributes’



I’m getting the same error when trying to install an app (that I just created) on a different server


I can’t install any custom apps. I even tried bench reinstall but with no luck.

ValueError: Document for field "field_order" attached to child table of "YouTube Upload Settings" must be a dict or BaseDocument, not type 'unicode' (clientid)


ValueError: Document for field "field_order" attached to child table of "Step Failure Mode" must be a dict or BaseDocument, not type 'unicode' (potential_failure_mode)


Can anyone duplicate this? I created a new app on bench (latest develop branch), and when trying install-app on another bench (latest production version), I get the above.


hello @dirkvdl16 i was able to solve the problem by deleting doctype folder because in my project there was no need for doctype-field. i dont know what would be the side effect of deleting doctype folder. but for now its working…
Thank you.


Thanks for the info.

I figure that there must’ve been a recent change on the develop branch of frappe that changes the json structure on how DocTypes are saved. So my Production instance can’t read the json file correctly when it tries to install the custom app I made with frappe (on the latest development branch).

I’ve now changed my Development VM to still be a development environment, but use the master branch. This solves it for me


Cool thanks @dirkvdl16. Also experienced this issue when trying to install a custom app created on the develop branch. I’ve also now switched to using a development environment on the master branch.

Did you rebuild your entire custom app from scratch using the master branch or were you able to change the existing custom app back in the develop branch?



I fixed the .json files of the affected doctypes manually. Comparing old and new, you’ll see the structure changes, and be able to rejig your file to the old structure