python-ami
python-ami copied to clipboard
dont work with python 3.8
module 're' has no attribute '_pattern_type'
I just encountered this issue. Looks like its fixed in the master but not in the pip package
Yeah, it looks like that I forgot to release this fix
https://pypi.org/project/asterisk-ami/0.1.6/
Just a heads up, there might be a bug in the latest release. The AMI is disconnecting but If I roll back to the previous release it works fine.
Something is firing the disconnect here - https://github.com/ettoreleandrotognoli/python-ami/blob/00fbaa2b59060d78937af934aabca3241ae4c2be/asterisk/ami/client.py#L186
I will try and troubleshoot some more tomorrow
Thanks!
Replicated with this simple script taken from the example - https://gist.github.com/marrold/8c4cf1b7c89dc3935626f5ab85d4cd0f
After a few seconds I get The AMI has disconnected: None
Looking at the actual messages to the AMI, it randomly tries to login in again despite a ping response, then finally gives up - https://gist.github.com/marrold/652ca6afc0a1d551332cdbff6cae2099
I reverted this commit and now it works - https://github.com/ettoreleandrotognoli/python-ami/commit/8bed899ca170feb0abddf0e3105c8ffe8c5d0903
But unfortunatly I don't know why that's causing the issue.
@jowrjowr do you recall why you made this change? Do you know why it would cause this issue? Thanks!
All I can remember is what I put in as the commit reason, and that seems pretty self-explanatory.
As I recall, connections would time out but never fail and that was causing issues with some scripting around a client's Asterisk I was working with at the time. Haven't touched this stuff since so I have no recent insight.
Okay, thanks for the info
I think this might be an issue on my side, I'll continue to investigate.