ValueError for Region.onChange()
OswaldoAtGit opened this issue · comments
Using Python 3.6:
The Region.onChange event always raised an error in RegionMatching.py located at line 1658.
Missing a condition for the special pattern tuple (int, numpy.ndarray) . isinstance is not working here.
line 1658 changed to
if not(isinstance(pattern, Pattern) or isinstance(pattern, basestring)
or (len(pattern)==2 and isinstance(pattern[0], int) and isinstance(pattern[1], numpy.ndarray))):
So, this works for me right now.
Maybe a more elegant solution should implement an event_type "CHANGE" specific check.
Thanks for the report. I'll review when I have time, or you can submit a pull request to the dev branch!