<commit_before># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe

no_cache = 1

def get_context(context):
	if frappe.flags.in_migrate: return
	context.http_status_code = 500

	print(frappe.get_traceback().encode("utf-8"))
	return {"error": frappe.get_traceback().replace("<", "&lt;").replace(">", "&gt;") }
<commit_msg>fix: show traceback as string instead of bytes<commit_after># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe

no_cache = 1

def get_context(context):
	if frappe.flags.in_migrate: return
	context.http_status_code = 500

	print(frappe.get_traceback())
	return {"error": frappe.get_traceback().replace("<", "&lt;").replace(">", "&gt;") }

{'fraction_non_alphanumeric': 0.15315315315315314, 'fraction_numerical': 0.021879021879021878, 'mean_word_length': 5.824561403508772, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5858087', 'n_tokens_mistral': 284, 'n_tokens_neox': 275, 'n_words': 69}