diff --git a/webinterface.py b/webinterface.py index 59e6c849..aa8ec1b5 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2137,8 +2137,14 @@ def htmlIndividualPost(translate: {}, \ postFilename=locatePost(baseDir,nickname,domain,postJsonObject['object']['inReplyTo']) if not postFilename: break - with open(postFilename, 'r') as fp: - postJsonObject=commentjson.load(fp) + loadedPost=False + try: + with open(postFilename, 'r') as fp: + postJsonObject=commentjson.load(fp) + loadedPost=True + except Exception as e: + print(e) + if loadedPost: postStr= \ individualPostAsHtml(iconsDir,translate,None, \ baseDir,session,wfRequest,personCache, \