Skip to content

Deleting an object that was created with a failed read_from_str() leads to an AttributeError

E.g., start with the following:

>>> import islpy as isl
>>> isl.Set("{")
syntax error (1, 2): unexpected EOF
syntax error (1, 2): unexpected EOF
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/matt/src/env-3.6/lib/python3.6/site-packages/islpy/__init__.py", line 185, in obj_init
    new_me = self.read_from_str(context, s)
  File "/home/matt/src/env-3.6/lib/python3.6/site-packages/islpy/_isl.py", line 52395, in read_from_str
    % _get_last_error_str(_ctx_data))
islpy._isl.Error: call to isl_set_read_from_str failed: isl_error_none

Upon exiting the interpreter, this happens:

>>> ^D
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
  File "/home/matt/src/env-3.6/lib/python3.6/site-packages/islpy/_isl.py", line 963, in __del__
    if self.data is not None:
AttributeError: 'Set' object has no attribute 'data'