Closed peak-load closed 4 years ago
Change all "re._pattern_type" to "re.Pattern" in file asterisk/ami/event.py
This is same problem!
File "/usr/local/lib/python3.7/site-packages/asterisk/ami/client.py", line 241, in add_event_listener
event_listener = EventListener(on_event=on_event, **kwargs)
File "/usr/local/lib/python3.7/site-packages/asterisk/ami/event.py", line 89, in __init__
self.white_list = [white_list] if isinstance(white_list, (basestring, re._pattern_type)) else white_list
AttributeError: module 're' has no attribute '_pattern_type'
Error:
Source code:
Looks like _pattern_type was removed in 3.7. here's what it is in 3.6 https://github.com/python/cpython/blob/3.6/Lib/re.py#L283