libracore/erpnextswiss

how to install properly (which version is adviced?)

Closed this issue · 2 comments

I would love to use the csv import-features.

Expected behaviour

$ bench get-app https://github.com/libracore/erpnextswiss.git
$ bench install-app erpnextswiss

Actual behaviour

$ bench get-app https://github.com/libracore/erpnextswiss.git
Usage: bench get-app [OPTIONS] NAME GIT_URL

Error: Missing argument "git-url".None
$ bench get-app erpnextswiss https://github.com/libracore/erpnextswiss.git
(goes fine)
$ bench install-app erpnextswiss

Installing erpnextswiss... Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, 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 77, in <module> main() File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 14, 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 664, in __call__ return self.main(*args, **kwargs) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 644, in main rv = self.invoke(ctx) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 991, 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 991, 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 837, 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 464, in invoke return callback(*args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/commands.py", line 28, in _func ret = f(frappe._dict(ctx.obj), *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/commands.py", line 163, in install_app _install_app(app, verbose=context.verbose) File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 120, in install_app add_module_defs(name) File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 230, in add_module_defs d.save() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 214, in save self.insert() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 186, in insert self.db_insert() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 254, in db_insert ), d.values()) File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 135, in sql self._cursor.execute(query, values) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute self.errorhandler(self, exc, value) File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue frappe.exceptions.NameError: (u'Module Def', u'ERPNextSwiss', IntegrityError(1062, "Duplicate entry 'ERPNextSwiss' for key 'PRIMARY'"))

Actually this is output of the second attempt (dont have the first run output). Installing it from the UI gives me this:

image

Observed in (version)

erpnext masterbranch latest commit 41721fe
(https://hub.docker.com/r/davidgu/erpnext)

I would advice you to reinstall ERPNextSwiss:

bench --site site.name uninstall-app erpnextswiss
bench update
bench --site site.name install-app erpnextswiss

the first command may result in an error because "bench" cannot remove print formats. This can be resolved by following commands:

bench --site site.name console
# Will open a python shell
for format in frappe.get_list("Print Format", filters={'module': 'ERPNextSwiss'}, fields=["name"]):
    frappe.delete_doc("Print Format",format["name"])
    print(format["name"])
frappe.db.commit()
exit()

after execution retry the reinstall

don't forget to replace "site.name" with the actual site name

Should this also throw an error please provide the details.

I would recommend to use the master brench which has all the tested features and bug fixes.
Maybe install and test new versions on a replica of your production. Same goes for ERPNext and Frappe releases.

No activity for 1 month, closing answered issue.