##// END OF EJS Templates
fix(jupyter): fixed bug. Fixes: RCCE-26
ilin.s -
r5263:9346386e default
parent child Browse files
Show More
@@ -541,9 +541,7 b' class MarkupRenderer(object):'
541 captured_errors = {}
541 captured_errors = {}
542 # TODO: In the event of a newer jupyter notebook version, consider increasing the as_version parameter
542 # TODO: In the event of a newer jupyter notebook version, consider increasing the as_version parameter
543 notebook = nbformat.reads(source, as_version=4, capture_validation_error=captured_errors)
543 notebook = nbformat.reads(source, as_version=4, capture_validation_error=captured_errors)
544 try:
544 if captured_errors:
545 (body, resources) = as_html(notebook)
546 except AttributeError:
547 error_messages = '<br>'.join(str(error) for error in captured_errors.values())
545 error_messages = '<br>'.join(str(error) for error in captured_errors.values())
548 body = f"""
546 body = f"""
549 <div style="text-align: center;">
547 <div style="text-align: center;">
@@ -551,6 +549,8 b' class MarkupRenderer(object):'
551 <p>{error_messages}</p>
549 <p>{error_messages}</p>
552 </div>
550 </div>
553 """
551 """
552 else:
553 body, _ = as_html(notebook)
554 return body
554 return body
555
555
556
556
General Comments 0
You need to be logged in to leave comments. Login now