From bd5d3003862c09a6019c2a537c3f607e3ef5a6d6 Mon Sep 17 00:00:00 2001 From: pluja Date: Sun, 11 Oct 2020 07:51:49 +0200 Subject: [PATCH] Fix error with descriptions --- app/routes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 9900aac..d010a68 100644 --- a/app/routes.py +++ b/app/routes.py @@ -484,7 +484,12 @@ def watch(): v_format['audio_valid'] = True # Markup description - info['description'] = Markup(bleach.linkify(info['description'].replace("\n", "
"))) + try: + info['description'] = Markup(bleach.linkify(info['description'].replace("\n", "
"))) + except AttributeError: + print(info['description']) + info['description'] = Markup(bleach.linkify(info['description'])) + # Get comments videocomments = comments.video_comments(id, sort=0, offset=0, lc='', secret_key='')