Vocab-Apps / anki-language-tools

Anki Language Tools addon
GNU General Public License v3.0
6 stars 0 forks source link

Not working on mac #49

Open fabricem1 opened 2 years ago

fabricem1 commented 2 years ago

I get the following 2 error messages when trying to use the Language Tools add on. The internet is very slow where I work so it could be a contributing factor. I have the add on on a PC with windows 10 and it seems to work fine there.

on clicking Language Mapping 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, repeat 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 on the add-ons section of our support site. Debug info: Anki 2.1.44 (b2b3275f) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Mac 10.15.7 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-07-23 21:47:47 Add-ons possibly involved: ⁨Language Tools - Learn Foreign Languages with Anki⁩

Caught exception: Traceback (most recent call last): File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/gui.py", line 31, in show_language_mapping dialogs.language_mapping_dialogue(languagetools) File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/dialogs.py", line 773, in language_mapping_dialogue mapping_dialog = dialog_languagemapping.prepare_language_mapping_dialogue(languagetools) File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/dialog_languagemapping.py", line 423, in prepare_language_mapping_dialogue mapping_dialog.ui = LanguageMappingDialog_UI(languagetools, mapping_dialog) File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/dialog_languagemapping.py", line 38, in init data = languagetools.get_all_language_arrays() File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/languagetools.py", line 140, in get_all_language_arrays language_dict = self.get_all_languages() File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/languagetools.py", line 136, in get_all_languages return self.language_list AttributeError: 'LanguageTools' object has no attribute 'language_list'

When trying to type API key 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, repeat 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 on the add-ons section of our support site. Debug info: Anki 2.1.44 (b2b3275f) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2 Platform: Mac 10.15.7 Flags: frz=True ao=True sv=2 Add-ons, last update check: 2021-07-23 21:47:47 Add-ons possibly involved: ⁨Language Tools - Learn Foreign Languages with Anki⁩

Caught exception: Traceback (most recent call last): File "urllib3/connectionpool.py", line 699, in urlopen File "urllib3/connectionpool.py", line 382, in _make_request File "urllib3/connectionpool.py", line 1010, in _validateconn File "urllib3/connection.py", line 411, in connect File "urllib3/util/ssl.py", line 428, in ssl_wrapsocket File "urllib3/util/ssl.py", line 472, in _ssl_wrap_socket_impl File "ssl.py", line 500, in wrap_socket File "ssl.py", line 1040, in _create File "ssl.py", line 1309, in do_handshake ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1124)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "requests/adapters.py", line 439, in send File "urllib3/connectionpool.py", line 755, in urlopen File "urllib3/util/retry.py", line 573, in increment urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='cloud-language-tools-prod.anki.study', port=443): Max retries exceeded with url: /verify_api_key (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1124)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "aqt/taskman.py", line 88, in _on_closures_pending File "aqt/taskman.py", line 59, in File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/dialog_apikey.py", line 89, in verify_api_key_done is_valid, message = future_result.result() File "concurrent/futures/_base.py", line 432, in result File "concurrent/futures/_base.py", line 388, in __get_result File "concurrent/futures/thread.py", line 57, in run File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/dialog_apikey.py", line 86, in verify_api_key_background return self.languagetools.verify_api_key(api_key_text) File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/languagetools.py", line 94, in verify_api_key result = self.cloud_language_tools.api_key_validate_query(api_key) File "/Users/fabricem/Library/Application Support/Anki2/addons21/771677663/cloudlanguagetools.py", line 30, in api_key_validate_query response = requests.post(self.base_url + '/verify_api_key', json={ File "requests/api.py", line 119, in post File "requests/api.py", line 61, in request File "requests/sessions.py", line 542, in request File "requests/sessions.py", line 655, in send File "requests/adapters.py", line 514, in send requests.exceptions.SSLError: HTTPSConnectionPool(host='cloud-language-tools-prod.anki.study', port=443): Max retries exceeded with url: /verify_api_key (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1124)')))

luc-vocab commented 2 years ago

The error message you're getting seems to suggest there's a firewall or VPN creating issues, is this the case on your computer ?

fabricem1 commented 2 years ago

Hi Luc,

I have returned home since and language tools is working on my mac so it happened to gave been my work WiFi which was blocking the addon. My PC laptop is a work laptop so I have no control on the security settings. I assume it has a firewall and I often use a VPN.

Kind regards,

Fabrice

On Sat, 14 Aug 2021, 01:46 LucW, @.***> wrote:

The error message you're getting seems to suggest there's a firewall or VPN creating issues, is this the case on your computer ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lucwastiaux/anki-language-tools/issues/49#issuecomment-898782664, or unsubscribe https://github.com/notifications/unsubscribe-auth/APBTXDPEFPK6ICPLDADBXLTT4W4FXANCNFSM5A4YJ2XQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .