1goodday / Google-Dictionary.ankiaddon

Anki Addon to add Google Dictionary results (American and/or British English accents + meanings + translation) to vocabulary entries
MIT License
0 stars 0 forks source link

Add pronunciation not working #3

Closed Shove6469 closed 2 years ago

Shove6469 commented 2 years ago

hello I have a issue with google dictionary on Ubuntu 22.04 LTS The issue is when I want to add a pronunciation via google dictionary it gives me this error

Error An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed. If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem. When you've discovered the add-on that is causing the problem, please report the issue to the add-on author. Debug info: Anki 2.1.50 (26d40c3a) Python 3.9.10 Qt 5.15.2 PyQt 5.15.5 Platform: Linux Flags: frz=True ao=True sv=2 Add-ons, last update check: 2022-05-03 22:43:34 Add-ons possibly involved: ⁨Google Dictionary⁩

Caught exception: Traceback (most recent call last): File "aqt.webview", line 42, in cmd File "aqt.webview", line 149, in _onCmd File "aqt.webview", line 613, in _onBridgeCmd File "aqt.editor", line 464, in onBridgeCmd File "/home/mohammad/.var/app/net.ankiweb.Anki/data/Anki2/addons21/1346635841/anki_funcs.py", line 689, in _add_pronunciation_mp3s_single ).pronunciation_field] += editor._addMedia(file_path_us) File "aqt.editor", line 740, in _addMedia File "anki.media", line 95, in add_file FileNotFoundError: [Errno 2] No such file or directory: 'hello_en_us_1.mp3'

however the other features like first and all definition and translation work just fine thank you in advance for your help

1goodday commented 2 years ago

Hello @Shove6469 , Thanks for raising the case. I was busy these days and couldn't answer in time; sorry for that.

I upgraded the Ubuntu on my system from 20.04 to 22.04 (I usually use Windows), then used the old stable Anki version 2.1.49 and it was working fine. Then upgraded to 2.1.52 Qt6 and luckily! faced the same error.

I tried downgrading to 2.1.52 Qt5 and then to 2.1.49 as a temporary solution to suggest to you if it worked, but another problem happened. The decks didn't show anymore, at least on my system. I've not been able to find the source of the problem yet. It might be PyQt6 remaining on the system or a similar issue. But anyway, a clean Ubuntu 22.04 (I mean before installing any 2.1.52 version) works well with 2.1.49. You can try either cleaning your Ubuntu from the residual Anki files (maybe you know a quick solution if you are an experienced Ubuntu user, I can't suggest reinstalling Ubuntu though it works!) and then install 2.1.49.

Meanwhile, I will start working on the error in the new version and let you know when it's resolved.

Regards,

Roozbeh

1goodday commented 2 years ago

Hello @Shove6469 , The issue is resolved in the add-on new version (v5.0.1). As I checked, it works with the Anki old stable (2.1.49), as well as the new 2.1.54 (Qt5 and Qt6). Thanks if you check and confirm.

However, it seems that Anki 2.1.54 (both Qt5 and Qt6) has a display problem (they don't distinguish the entry from its attached media files, a display not a functionality issue). So my suggestion is to stick to the stable version 2.1.49 yet.

Regards,

Roozbeh