diff --git a/LCS/PyCommon/json_utils.py b/LCS/PyCommon/json_utils.py
index decd4b07318edfcb53a4ca0036048d6781dcb1e8..f5ca530baf50e73e25cbbba69c21f85b006899bd 100644
--- a/LCS/PyCommon/json_utils.py
+++ b/LCS/PyCommon/json_utils.py
@@ -438,8 +438,8 @@ def validate_json_against_schema(json_doc: typing.Union[str,dict], schema: typin
     if '$schema' not in json_doc:
         raise jsonschema.exceptions.ValidationError("The json document does not contain a $schema property\n%s" % (schema,))
 
-    if json_doc['$schema'].rstrip('/ref_resolved').rstrip('#').rstrip('/') != schema.get('$id','').rstrip('#').rstrip('/'):
-        raise jsonschema.exceptions.ValidationError("The json document with $schema='%s' cannot be validated by schema with $id='%s'\n%s" % (json_doc['$schema'], schema.get('$id')))
+    if json_doc['$schema'].rstrip('/ref_resolved').rstrip('#').rstrip('/') != schema.get('$id','').rstrip('/ref_resolved').rstrip('#').rstrip('/'):
+        raise jsonschema.exceptions.ValidationError("The json document with $schema='%s' cannot be validated by schema with $id='%s'" % (json_doc['$schema'], schema.get('$id')))
 
     # resolve $refs to fill in defaults for those, too
     schema = resolved_remote_refs(schema, cache=cache, max_cache_age=max_cache_age)