Closed whitedavidp closed 6 days ago
BTW - I did as shown here.
Well, the application webUI is Flask - so the error was somehow earned. Never seen this before so it was take some digging. In the meantime, some environment information would be a good start.
Was this a fresh install (new venv) or an upgrade? Need to find what version of flask
is installed too. Set DEBUG=True
and re-test - log may have a better hint where we died.
This was an "upgrade" as shown in your post...
$ source venv/bin/activate
$ pip3 install "callattendant@git+https://github.com/thess/callattendant@mqtt-dev"
but I use pip, not pip3 on my Ubuntu.
Here is a snap on the flask stuff under my site-packages...
Note that on my Ubuntu, I have only python 3.1 and I saw somewhere that CA is looking for 3.5. I tried to update from 3.1 to 3.5 but 3.5 doesn't seem to be in the repositories for my Ubuntu.
Here is more info. I have found that as long as I leave this config line alone, all works as expected...
MQTT_CALLERID_FORMAT = "RAW"
Change it to "DISPLAY" and the above reported problem occurs...
I can live with it this way. Best
but I use pip, not pip3 on my Ubuntu.
In most Python 3 installations now-a-days pip and pip3 are the same - as is python and python3 (they are links)
I have only python 3.1 and I saw somewhere that CA is looking for 3.5.
You are using Python 3.10 not 3.1 - so no need to downgrade to 3.5 (min required)
The part about using DISPLAY for CALLERID_FORMAT is a big hint - thanks. Stay tuned.
As always thanks. I am getting old and in the way - can't ever read any more :-(
FYI - moved to 2.0.1 and changed to DISPLAY. No longer crashing. Most excellent!
Thanks for verifying the fix. Will close this after 2.x release
I think I have done things right. And I have configured the MQTT items to send caller id info.
But when a call comes in, CA crashes and I see this:
I have googled "python Working outside of application context" and most of what I see refers to Flask.
Does this ring any bells?
Thanks