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

'Num2Word_FA' object has no attribute 'str_to_number' #522

Open
karim23657 opened this issue Jun 3, 2023 · 0 comments
Open

'Num2Word_FA' object has no attribute 'str_to_number' #522

karim23657 opened this issue Jun 3, 2023 · 0 comments

Comments

@karim23657
Copy link

code

from num2words import num2words
d='5'
print(num2words(d, lang='fa')) # must print "پنج"

but it causes an error:

[/usr/local/lib/python3.10/dist-packages/num2words/__init__.py](https://localhost:8080/#) in num2words(number, ordinal, lang, to, **kwargs)
     87 
     88     if isinstance(number, str):
---> 89         number = converter.str_to_number(number)
     90 
     91     # backwards compatible

AttributeError: 'Num2Word_FA' object has no attribute 'str_to_number'
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

Successfully merging a pull request may close this issue.

1 participant