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 thrown when pinyin starts with a capital letter #8

Closed
ethanxrosen opened this issue Sep 25, 2024 · 2 comments
Closed

Error thrown when pinyin starts with a capital letter #8

ethanxrosen opened this issue Sep 25, 2024 · 2 comments

Comments

@ethanxrosen
Copy link

happens whether or not I have the "reformat pinyin" option active on importing. any flash cards below the capital pinyin entry in the export.txt won't be imported after the error is thrown.

in my case the specific word this happened for was 阿弥陀佛 E5mi2tuo2fo2 Buddhism
and I assume it will also happen for other proper nouns
I went into the export.txt and changed it to lowercase "e5mi2tuo2fo2" after which things started working correctly again

error below:

Anki 24.04 (429bc9e1) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-14.6.1-arm64-arm-64bit

Traceback (most recent call last):
File "/Users/ethan/Library/Application Support/Anki2/addons21/427686509/init.py", line 60, in excecuted_function
bookmark = Bookmark(slice, configs)
File "/Users/ethan/Library/Application Support/Anki2/addons21/427686509/pleco/Bookmark.py", line 14, in init
self.pinyin_pretty = convert_from_numerical_pinyin(self.pinyin_ugly)
File "/Users/ethan/Library/Application Support/Anki2/addons21/427686509/tones/numerical_pinyin_converter.py", line 47, in convert_from_numerical_pinyin
finished_char = convert_indiv_character(indiv_character)
File "/Users/ethan/Library/Application Support/Anki2/addons21/427686509/tones/numerical_pinyin_converter.py", line 108, in convert_indiv_character
raise ValueError("Invalid numerical pinyin. Input does not contain a vowel.")
ValueError: Invalid numerical pinyin. Input does not contain a vowel.

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AwesomeTTS - Add speech to your flashcards ['1436550454', 2024-09-14T14:04, 'None', '']
Chinese Support 3 ['1752008591', 2024-02-25T17:37, 'None', mod]
Learning Step and Review Interval Retention ['1949865265', 2024-01-07T01:48, 'None', '']
Pleco to Anki ['427686509', 2024-05-03T22:31, 'None', '']
Straight Reward ['957961234', 2023-11-01T22:11, 'None', '']

===IDs of active AnkiWeb add-ons===
1436550454 1752008591 1949865265 427686509 957961234

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

@vonpetersenn
Copy link
Owner

vonpetersenn commented Sep 25, 2024

Interesting one!
Captital letters in Pinyin are non-standard, but if Pleco uses them this Addon should support them too.
I will try to update the Addon soon. Probably by automatically changing all pinyin-input to lowercase before further processing.

@vonpetersenn
Copy link
Owner

The newest version of the addon adresses this bug

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