Open matejdro opened 2 months ago
Hi, how did you install Anki, is it with a package in your distribution?
It's the anki-bin AUR package https://aur.archlinux.org/packages/anki-bin
I'm getting the same error. I installed it from the AUR anki (source) package: https://aur.archlinux.org/packages/anki
It doesn't look like it's an AwesomeTTS issue. The arch package uses the system version of python (3.12) and that probably won't work with Anki. If you'd like to get back to a working version, install the package from ankiweb: https://apps.ankiweb.net/
Anki works great for me, including a bunch of other add-ons, except for this addon.
Any chance this add on could be updates to new python? It would have to be done eventually anyway, once bundled anki python updates.
Anki works great for me, including a bunch of other add-ons, except for this addon.
Any chance this add on could be updates to new python? It would have to be done eventually anyway, once bundled anki python updates.
ditto, since AUR is rolling release, many more users can face this issue anytime soon
if I can find a way to fix for both python 3.9 (official python interpreter used by Anki) and python 3.12, I will. Give me a bit of time to look into this.
I'm having the same problem. According to Python 3.11's documentation locale.format
has been deprecated since Pyhon 3.7 and has been replaced by format_string
. It seems it has completely been removed in Python 3.12.
to
from locale import format_string as locale
solved the issue for me. But I have not tested it out with other Python versions. But note that also the documentation of 3.9 suggests replacing it with format_string
, so I would assume this fix should work from 3.9+.
Thanks a lot for the suggested fix. Give me a day or two to test and i'll merge it.
Looking forward to the fix!
Sorry I got delayed but i'm definitely planning on fixing this very soon, in the coming days.
I'm not able to test AwesomeTTS with Python 3.12 at all, it crashes on startup for me. I still think it's questionable for the various package maintainers to unilateraly upgrade the python interpreter, when Anki is really only officially tested with Python 3.9. That said I did implement the fix, could someone on Arch or other affected Linux distributions grab the addon file and test it ? https://github.com/Vocab-Apps/anki-awesome-tts/releases/tag/v1.88.2 If it works, I'll publish it on Ankiweb.
I'd also like to ask everyone whether they would consider upgrading to HyperTTS ? It's a better tested, more capable, more modern version of AwesomeTTS: https://ankiweb.net/shared/info/111623432 I just tested it and it's fully compatible with Python 3.12.
@luc-vocab I would love to move to HyperTTS but it does not work on Arch at all if you want to use Azure or Amazon voices. It fails with Cannot access local variable 'voice' where it is not associated with a value
.
@yacodes many thanks for this feedback, if you have a chance could you share the stack trace ? I also need to find a way to test the Arch packages on my setup.
@luc-vocab Not sure how to do it correctly. Running anki
from the terminal and forcing the error to occur shows this:
Qt info: libpng warning: iCCP: known incorrect sRGB profile
2024-05-24 20:26:12,406:WARNING:urllib3.connectionpool: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fea7c9929c0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /api/6170140/envelope/
2024-05-24 20:26:12,413:WARNING:urllib3.connectionpool: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fea7c992ba0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /api/6170140/envelope/
2024-05-24 20:26:12,421:WARNING:urllib3.connectionpool: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fea7c992c90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /api/6170140/envelope/
That output by itself doesn't constitute an error, are Anki and AwesomeTTS coming up properly ?
@luc-vocab verified that the move from format
to format_string
works and is good to go.
locale.format
was already deprecated in 3.9, so no concerns there about breaking clients on the recommended python version. format_string
is basically a superset of format
, so current usage should be fine
OK, i've release AwesomeTTS 1.88.2 with the change which fixes this, please let me know if you run into any issues.
Thank you! Works for me now :+1:
Thanks a lot for this fix! Can confirm that AwesomeTTS is working now.
Hello,
After updating to the latest Python, addon does not start anymore: