revant / civil_contracting

Frappe App for use in Civil Contracting Business
http://revant.github.io/civil_contracting
GNU General Public License v2.0
32 stars 52 forks source link

Unable to install civil_contracting #43

Open zenny opened 6 years ago

zenny commented 6 years ago

Hi Revant,

Nice work, but the install-app phase dies with the following with Ubuntu 16.04 host with docker_frappe.

Installing civil_contracting...
Updating DocTypes for civil_contracting: [========================================]
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/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 94, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 165, in install_app
    _install_app(app, verbose=context.verbose)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 145, in install_app
    add_to_installed_apps(name)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 166, in add_to_installed_apps
    post_install(rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 230, in post_install
    init_singles()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 251, in init_singles
    doc.save()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 256, in save
    return self._save(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 279, in _save
    self.insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 207, in insert
    self._set_defaults()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 587, in _set_defaults
    new_doc = frappe.new_doc(df.options, as_dict=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 614, in new_doc
    return get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py", line 20, in get_new_doc
    frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py", line 41, in make_new_doc
    set_user_and_static_default_values(doc)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py", line 56, in set_user_and_static_default_values
    user_default_value = get_user_default_value(df, defaults, user_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py", line 71, in get_user_default_value
    if (frappe.get_meta(df.options).document_type=="Setup"
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 655, in get_meta
    return frappe.model.meta.get_meta(doctype, cached=cached)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 33, in get_meta
    lambda: Meta(doctype))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", line 173, in hget
    value = generator()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 33, in <lambda>
    lambda: Meta(doctype))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 72, in __init__
    super(Meta, self).__init__("DocType", doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 103, in __init__
    self.load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 77, in load_from_db
    super(Meta, self).load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 140, in load_from_db
    frappe.throw(_("{0} {1} not found").format(_(self.doctype), self.name), frappe.DoesNotExistError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 323, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 309, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 282, in _raise_exception
    raise raise_exception(encode(msg))
frappe.exceptions.DoesNotExistError: DocType Company not found

Seems like it needs python2.7 whereas Ubuntu 16.04 comes with python3.4, just a wild guess.

Cheers, /z

AminovE99 commented 5 years ago

Bump