Demo instance creation on Master fails

Hi,

When I created a demo instance on a master branch instance of ERPnext it failed while loading the BOM . Call stack was as follows
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/commands/init.py”, line 45, in make_demo
demo.make(domain, days)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/demo/demo.py”, line 31, in make
manufacture.setup_data()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/demo/setup/manufacture.py”, line 19, in setup_data
import_json(‘BOM’, submit=True)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/demo/setup/setup_data.py”, line 418, in import_json
doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 228, in insert
self.run_before_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 886, in run_before_save_methods
self.run_method(“validate”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 786, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1055, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 1038, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 780, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/bom/bom.py”, line 58, in validate
self.validate_operations()
File “/home/frappe/frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/bom/bom.py”, line 582, in validate_operations
if not d.batch_size > 0:
TypeError: ‘>’ not supported between instances of ‘NoneType’ and ‘int’

Any reasons ? Should I raise a bug ?

Regards
Hari

Yes, please create a GitHub issue here

Thanks Jai.

I’ve raised an issue - https://github.com/frappe/erpnext/issues/18883

Also as I was moving forward in loading the demo I was getting other issues

  1. Asset scrap/sale was failing because “Finance Book” was not there . Commented the steps to move forward
  2. Subsequently had issues inprojects.run_projects(current_date) while running the simulation. Commented again to move forward
  3. In a subsequent simulation cycle it failed on stock.work()

I’d have a go at analyzing the issues, but as a recent user had a couple of questions

  1. Am I doing it right ? Are others also facing the issue ? I’m doing a make demo after a vanilla install of version 12.
  2. Is the demo framework/solution used / useful enough for these issues to be fixed ?