Traceback (most recent call last):
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/app.py”, line 55, in application
response = frappe.handler.handle()
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/handler.py”, line 40, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/init.py”, line 896, in call
return fn(*args, **newargs)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/client.py”, line 124, in insert
doc = frappe.get_doc(doc).insert()
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/model/document.py”, line 189, in insert
self.run_before_save_methods()
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/model/document.py”, line 750, in run_before_save_methods
self.run_method(“validate”)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/model/document.py”, line 651, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/model/document.py”, line 858, in composer
return composed(self, method, *args, **kwargs)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/model/document.py”, line 841, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/model/document.py”, line 645, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/erpnext/erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.py”, line 12, in validate
validate_template(self.terms)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/apps/frappe/frappe/utils/jinja.py”, line 32, in validate_template
jenv.from_string(html)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 862, in from_string
return cls.from_code(self, self.compile(source), globals, None)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 553, in compile
source = optimize(source, self)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/optimizer.py”, line 27, in optimize
return optimizer.visit(node)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/visitor.py”, line 39, in visit
return self.generic_visit(node, *args, **kwargs)
File “/home/indictrans/Documents/khushal/khushal1/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/visitor.py”, line 59, in generic_visit
for field, old_value in node.iter_fields():
AttributeError: ‘NoneType’ object has no attribute ‘iter_fields’
Report this issue
Not able to replicate the issue. What version are you on?
Can you run bench update once and see you still get the same error.