-
Notifications
You must be signed in to change notification settings - Fork 10
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
Chinese Support 3 Auto Populate Not Working #84
Comments
Hi, could you send the raw html from the Hanzi field? It looks like a |
Yup that's it. The newline in the field after the comma is messing with the plugin since it doesn't totally sanitize this input for a path. For the time being you can work around this by not using newlines, try using a ps from one Chinese learner to another you might want to check that 厅 is the right character there 😉 |
Thanks man this solved the issue. Super helpful! |
Describe the bug
Anki encounters a problem when I enter in the Hanzi and then press ' Tab' to auto-populate. Occassionally, this is resolved by restarting Anki, however the issue always comes back.
(Debug info below)
Anki 24.06.3 (d678e393) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Windows-10-10.0.22631
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 "C:\Users\esemo\AppData\Roaming\Anki2\addons21\1752008591\edit.py", line 121, in onFocusLost
if not update_fields(note, field, allFields):
File "C:\Users\esemo\AppData\Roaming\Anki2\addons21\1752008591\behavior.py", line 352, in update_fields
fill_sound(hanzi, copy)
File "C:\Users\esemo\AppData\Roaming\Anki2\addons21\1752008591\behavior.py", line 246, in fill_sound
s = sound(hanzi, config['speech'])
File "C:\Users\esemo\AppData\Roaming\Anki2\addons21\1752008591\sound.py", line 51, in sound
return '[sound:%s]' % AudioDownloader(hanzi, source).download()
File "C:\Users\esemo\AppData\Roaming\Anki2\addons21\1752008591\tts.py", line 52, in download
self.func()
File "C:\Users\esemo\AppData\Roaming\Anki2\addons21\1752008591\tts.py", line 59, in get_google
tts.save(self.path)
File "C:\Users\esemo\AppData\Roaming\Anki2\addons21\1752008591\lib\gtts\tts.py", line 312, in save
with open(str(savefile), 'wb') as f:
OSError: [Errno 22] Invalid argument: 'C:\Users\esemo\AppData\Roaming\Anki2\User 1\collection.media\我觉得厅和说还可以,\n读和写不好, 很多字我都不知道是什么意思_google_zh-CN.mp3'
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Chinese Support 3 ['1752008591', 2024-02-25T10: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])
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Specs (please complete the following information):
The auto populate used to work for me, but has recently given me issues for some reason.
The text was updated successfully, but these errors were encountered: