Jaimodiji commited on
Commit
dfffdce
·
1 Parent(s): f85b886

Upload json_processor.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. json_processor.py +1 -1
json_processor.py CHANGED
@@ -384,7 +384,7 @@ def save_processed_json():
384
  except json.JSONDecodeError as e:
385
  try:
386
  fixed_data = questions_data.replace('"', "'")
387
- fixed_data = re.sub(r"font-family:"([^"]+)"", lambda m: f"font-family:'{m.group(1).replace("", "'")}'", fixed_data)
388
  questions = json.loads(fixed_data)
389
  except Exception as inner_e:
390
  current_app.logger.error(f"Initial JSONDecodeError: {e}")
 
384
  except json.JSONDecodeError as e:
385
  try:
386
  fixed_data = questions_data.replace('"', "'")
387
+ fixed_data = re.sub(r'font-family:"([^"]+)"', lambda m: "font-family:'{}'".format(m.group(1).replace('"', "'")), fixed_data)
388
  questions = json.loads(fixed_data)
389
  except Exception as inner_e:
390
  current_app.logger.error(f"Initial JSONDecodeError: {e}")