python 3.7 StopIteration exception raised
Closed this issue · 1 comments
Saw this response for this exception in other packages:
maintainers need to update their code to use return instead of raise StopIteration() to end their generators, as PEP 479 has been enabled for all code in Python 3.7, chang:ng the behavior of StopIteration in a generator.
In executing the example code in https://attractors.readthedocs.io/en/latest/plotting_and_animation.html I get:
Attractor.set_animate_gradient(obj, width=10, height=10,
File "C:\Python\Python38\lib\site-packages\attractors\attractor.py", line 360, in set_animate_gradient
Attractor._wrap_set([obj], kwargs)
File "C:\Python\Python38\lib\site-packages\attractors\attractor.py", line 239, in _wrap_set
assert all(
RuntimeError: generator raised StopIteration
by following more closely the examplea in readthedocs, this problem disappears.