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

Все числа которые заканчиваются на 2 от 2 до 92 за исключением числа 12 вызывают ошибку AttributeError: 'NoneType' object has no attribute 'word' #12

Closed
AlexQuaken opened this issue Oct 14, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@AlexQuaken
Copy link

Все числа которые заканчиваются на 2 от 2 до 92 за исключением числа 12 вызывают ошибку AttributeError: 'NoneType' object has no attribute 'word'
Ошибка воспроизводится не со всеми словами, логики я не увидел, но на ватт повторятся всегда
{{ 1 | format(morph='ватт') }} Работает
{{ 2 | format(morph='ватт') }} вызывает ошибку
{{ 22 | format(morph='ватт') }} вызывает ошибку
{{ 32 | format(morph='ватт') }} вызывает ошибку
...
{{ 92 | format(morph='ватт') }} вызывает ошибку
{{ 112 | format(morph='ватт') }} Работает

image

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 14, 2021

Можно использовать ручной шаблон согласования для таких сложных слов. Укажите слова для цифр 1, 2 и 5

@AlexQuaken
Copy link
Author

AlexQuaken commented Oct 19, 2021

Все-таки с двойкой определенно какая-то проблема...

{{ 1|format(morph=['интеграция','интеграции','интеграций']) }} ожидает обновления
{{ 0|format(morph=['интеграция','интеграции','интеграций']) }} ожидают обновления
{{ 3|format(morph=['интеграция','интеграции','интеграций']) }} ожидают обновления

Работает только в случае as_text = false

image

@AlexxIT AlexxIT added the bug Something isn't working label Jun 12, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Jun 12, 2023

@AlexxIT AlexxIT closed this as completed Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants