Traceback (most recent call last):


 "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 45, in cancel

doc.cancel()


 "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 853, in cancel

self._cancel()


 "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 843, in _cancel

self.save()


 "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 260, in save

return self._save(*args, **kwargs)


 "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 313, in _save

self.run_post_save_methods()


 "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 910, in run_post_save_methods

self.run_method("on_cancel")


 "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 772, in run_method

out = Document.hook(fn)(self, *args, **kwargs)


 "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1048, in composer

return composed(self, method, *args, **kwargs)


 "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1033, in runner

add_to_return_value(self, f(self, method, *args, **kwargs))


 "/home/frappe/frappe-bench/apps/erpnext/erpnext/regional/italy/utils.py", line 285, in sales_invoice_on_cancel

for attachment in get_e_invoice_attachments(doc):


 "/home/frappe/frappe-bench/apps/erpnext/erpnext/regional/italy/utils.py", line 294, in get_e_invoice_attachments

company_tax_id = invoice.company_tax_id if invoice.company_tax_id.startswith("IT") else "IT" + invoice.company_tax_id
AttributeError: 'NoneType' object has no attribute 'startswith'

Traceback (most recent call last):


 "./gprof2dot.py", line 3329, in <module>

main()


 "./gprof2dot.py", line 3290, in main

profile = parser.parse()


 "./gprof2dot.py", line 1275, in parse

self.parse_cg()


 "./gprof2dot.py", line 1257, in parse_cg

while not self._cg_header_re.match(self.readline()):


 "./gprof2dot.py", line 1097, in readline

import traceback; traceback.print_exc()


 "/usr/lib/python3.4/traceback.py", line 252, in print_exc

print_exception(*sys.exc_info(), limit=limit, file=file, chain=chain)


 "/usr/lib/python3.4/traceback.py", line 169, in print_exception

for line in _format_exception_iter(etype, value, tb, limit, chain):


 "/usr/lib/python3.4/traceback.py", line 146, in _format_exception_iter

for value, tb in values:


 "/usr/lib/python3.4/traceback.py", line 125, in _iter_chain

context = exc.__context__
AttributeError: 'NoneType' object has no attribute '__context__'
