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

Error while creating a new site after easy install


#1
bench new-site site1.local --install-app erpnext
MySQL root password:
Creating Database...
9.22KiB 0:00:00 [ 409MiB/s] [======================================================================================================================>] 100%

Installing frappe...
Updating DocTypes for frappe        : [========================================]
Updating country info               : [========================================]
Set Administrator password:
Re-enter Administrator password:

Installing erpnext...
Updating DocTypes for erpnext       : [                                        ]Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/jupiter-bench/env/local/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/jupiter-bench/env/local/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/frappe/jupiter-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/jupiter-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/jupiter-bench/env/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/jupiter-bench/env/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/commands/site.py", line 34, in new_site
    verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/commands/site.py", line 69, in _new_site
    _install_app(app, verbose=verbose, set_as_patched=not source_sql)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/installer.py", line 145, in install_app
    sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/model/sync.py", line 56, in sync_for
    reset_permissions=reset_permissions, for_sync=True)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/modules/import_file.py", line 65, in import_file_by_path
    ignore_version=ignore_version, reset_permissions=reset_permissions)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/modules/import_file.py", line 100, in import_doc
    doc = frappe.get_doc(docdict)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/__init__.py", line 724, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/model/document.py", line 69, in get_doc
    return controller(*args, **kwargs)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/model/document.py", line 113, in __init__
    super(Document, self).__init__(kwargs)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/model/base_document.py", line 54, in __init__
    self.update(d)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/model/base_document.py", line 77, in update
    self.set(key, value)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/model/base_document.py", line 124, in set
    self.extend(key, value)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/model/base_document.py", line 161, in extend
    self.append(key, v)
  File "/home/frappe/jupiter-bench/apps/frappe/frappe/model/base_document.py", line 155, in append
    self.name, str(type(value))[1:-1], value)
ValueError: Document for field "field_order" attached to child table of "Accounts Settings" must be a dict or BaseDocument, not type 'unicode' (auto_accounting_for_stock)

#2

Did you solve this already?

Try

  1. cd /home/frappe/jupiter-bench
  2. bench update --reset
  3. bench --site site1.local install-app erpnext

#3

@adam26d thank you for your help, but
unfortunately I got same error.


#4

I got the same error after running bench update --reset on my test system while having checked out frappe’s master branch and erpnext’s develop branch. Take care to have both on master or both on develop.


#5

Try creating a new bench directory

cd ~/
bench init new-bench-name


#6

That was the problem. Apparently running bench get-app erpnext pulls from another source rather than master.
So I executed bench get-app erpnext --branch master and everything went right.

Thank you.