From a10364ffaa9487564b4dadeb4547fda3b996ee49 Mon Sep 17 00:00:00 2001 From: Shyam D Date: Fri, 9 Jul 2021 16:39:47 -0700 Subject: [PATCH] use strict mode to manage duplicates with pybtex --- emmet-core/emmet/core/provenance.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emmet-core/emmet/core/provenance.py b/emmet-core/emmet/core/provenance.py index 86070de24f..ba83d0f896 100644 --- a/emmet-core/emmet/core/provenance.py +++ b/emmet-core/emmet/core/provenance.py @@ -5,7 +5,8 @@ from monty.json import MontyDecoder from pybtex.database import BibliographyData, parse_string -from pydantic import BaseModel, EmailStr, Field, validator +from pybtex.errors import set_strict_mode +from pydantic import BaseModel, Field, root_validator, validator from emmet.core.material_property import PropertyDoc from emmet.core.mpid import MPID @@ -126,6 +127,7 @@ def from_SNLs( refs = {} for snl in snls: try: + set_strict_mode(False) entries = parse_string(snl["about"]["references"], bib_format="bibtex") refs.update(entries.entries) except Exception: