zcold / pycnnum

MIT License
19 stars 7 forks source link

pycnnum.num2cn(1) error: IndexError: list index out of range #9

Closed 8wordbar closed 5 months ago

8wordbar commented 5 months ago

code:

a = pycnnum.num2cn(1)

error :

   a = pycnnum.num2cn(1)
        ^^^^^^^^^^^^^^^^^
  File "..../lib/python3.11/site-packages/pycnnum/pycnnum.py", line 722, in num2cn
    if (getattr(result_symbols[0], "int_value", None) == 1) and (getattr(result_symbols[1], "power", None) == 1):
                                                                         ~~~~~~~~~~~~~~^^^
IndexError: list index out of range