Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions news/catch-YapsSyntaxError.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Let ``diffpy.structure`` pass the tests with ``pycifrw`` installed from ``PyPI``.

**Security:**

* <news item>
3 changes: 2 additions & 1 deletion src/diffpy/structure/parsers/p_cif.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from contextlib import contextmanager

import numpy
from CifFile.yapps3_compiled_rt import YappsSyntaxError

from diffpy.structure import Atom, Lattice, Structure
from diffpy.structure.parsers import StructureParser
Expand Down Expand Up @@ -408,7 +409,7 @@ def _parseCifDataSource(self, datasource):
# stop after reading the first structure
if self.stru is not None:
break
except (StarError, ValueError, IndexError) as err:
except (YappsSyntaxError, StarError, ValueError, IndexError) as err:
exc_type, exc_value, exc_traceback = sys.exc_info()
emsg = str(err).strip()
e = StructureFormatError(emsg)
Expand Down
Loading