Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to use auto-complete #86

Open
olaroleriri opened this issue Sep 24, 2024 · 2 comments
Open

Error when trying to use auto-complete #86

olaroleriri opened this issue Sep 24, 2024 · 2 comments

Comments

@olaroleriri
Copy link

An error appears when trying to use auto-complete function on the app. I put the character i want to add on the field and when i press "Tab" the error appears. Sometimes it works.

The screenshot below shows the error:

image

In english the options would be: "troubleshooting" and "copy debug info"

The debug info shows this:
Anki 24.06.3 (d678e393) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Linux-5.15.0-119-generic-x86_64-with-glibc2.38

Traceback (most recent call last):
File "aqt.webview", line 50, in cmd
File "aqt.webview", line 160, in _onCmd
File "aqt.webview", line 695, in _onBridgeCmd
File "aqt.editor", line 425, in onBridgeCmd
File "_aqt.hooks", line 2548, in call
File "anki.hooks", line 45, in runFilter
File "/home/emanuel/.var/app/net.ankiweb.Anki/data/Anki2/addons21/1752008591/edit.py", line 121, in onFocusLost
if not update_fields(note, field, allFields):
File "/home/emanuel/.var/app/net.ankiweb.Anki/data/Anki2/addons21/1752008591/behavior.py", line 352, in update_fields
fill_sound(hanzi, copy)
File "/home/emanuel/.var/app/net.ankiweb.Anki/data/Anki2/addons21/1752008591/behavior.py", line 246, in fill_sound
s = sound(hanzi, config['speech'])
File "/home/emanuel/.var/app/net.ankiweb.Anki/data/Anki2/addons21/1752008591/sound.py", line 51, in sound
return '[sound:%s]' % AudioDownloader(hanzi, source).download()
File "/home/emanuel/.var/app/net.ankiweb.Anki/data/Anki2/addons21/1752008591/tts.py", line 52, in download
self.func()
File "/home/emanuel/.var/app/net.ankiweb.Anki/data/Anki2/addons21/1752008591/tts.py", line 83, in get_baidu
with urlopen(request, context=context, timeout=5) as response, open(self.path, 'wb') as audio:
File "urllib.request", line 214, in urlopen
File "urllib.request", line 523, in open
File "urllib.request", line 632, in http_response
File "urllib.request", line 561, in error
File "urllib.request", line 494, in _call_chain
File "urllib.request", line 641, in http_error_default
urllib.error.HTTPError: HTTP Error 503: Service Unavailable

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Chinese Support 3 ['1752008591', 2024-02-25T06:37, 'None', mod]

===IDs of active AnkiWeb add-ons===
1752008591

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])

I saw there was another person with the same problem, but they were trying to add phrases, then i dont know the solution applies to my case.

@einar-io
Copy link

einar-io commented Oct 9, 2024

Seems like baidu is not responding as expected

get_baidu
..
urllib.error.HTTPError: HTTP Error 503: Service Unavailable

Does the issue persist if you change the speech engine under Menu Bar->Chinese->Speech Engine to something else than Baidu?

@olaroleriri
Copy link
Author

I think that was the issue, when i booted anki on a different day the issue was gone. Thank you anyway, if it happens again i'll try to change the speech engine to be sure this was the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants