I have installed ErpNext 13. When I try to import demo data, I get the error.
(venv) erpnext@erpnext:~/frappe-bench$ bench --site erp.lab.serverok.in execute erpnext.demo.demo.make
Complete Setup...
Traceback (most recent call last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/utils.py", line 213, in execute
ret = frappe.get_attr(method)(*args, **kwargs)
File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/demo/demo.py", line 34, in make
setup_data.setup(domain)
File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/demo/setup/setup_data.py", line 21, in setup
setup_fiscal_year()
File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/demo/setup/setup_data.py", line 93, in setup_fiscal_year
fiscal_year = frappe.get_doc({
File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 238, in insert
self.run_before_save_methods()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 968, in run_before_save_methods
self.run_method("validate")
File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 860, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 1158, in composer
return composed(self, method, *args, **kwargs)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 1141, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/erpnext/frappe-bench/apps/frappe/frappe/model/document.py", line 854, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/doctype/fiscal_year/fiscal_year.py", line 30, in validate
self.validate_overlap()
File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/doctype/fiscal_year/fiscal_year.py", line 94, in validate_overlap
frappe.throw(_("Year start date or end date is overlapping with {0}. To avoid please set company")
File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 438, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 417, in msgprint
_raise_exception()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 371, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.NameError: Year start date or end date is overlapping with 2021-2022. To avoid please set company
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 104, in <module>
main()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 19, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 27, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/utils.py", line 215, in execute
ret = frappe.safe_eval(method + "(*args, **kwargs)", eval_globals=globals(), eval_locals=locals())
File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 1753, in safe_eval
return eval(code, eval_globals, eval_locals)
File "<string>", line 1, in <module>
NameError: name 'erpnext' is not defined
(venv) erpnext@erpnext:~/frappe-bench$
I tried to resume the operation with command, that is also failing
(venv) erpnext@erpnext:~/frappe-bench$ bench --site erp.lab.serverok.in execute erpnext.demo.demo.simulate
Traceback (most recent call last):
File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/utils.py", line 213, in execute
ret = frappe.get_attr(method)(*args, **kwargs)
File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/demo/demo.py", line 73, in simulate
fixed_asset.work()
File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/demo/user/fixed_asset.py", line 26, in work
asset = get_random_asset()
File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/demo/user/fixed_asset.py", line 44, in get_random_asset
return frappe.db.sql(""" select name, item_code, value_after_depreciation, gross_purchase_amount
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 104, in <module>
main()
File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 19, in main
click.Group(commands=commands)(prog_name='bench')
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 27, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/utils.py", line 215, in execute
ret = frappe.safe_eval(method + "(*args, **kwargs)", eval_globals=globals(), eval_locals=locals())
File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 1753, in safe_eval
return eval(code, eval_globals, eval_locals)
File "<string>", line 1, in <module>
NameError: name 'erpnext' is not defined
(venv) erpnext@erpnext:~/frappe-bench$
Any idea why this is happening?