发现一个 bug。在管理模式下清理词库时,有一个用到双引号来指定范围的语法,用的时候加入了一个空格(如" 2-99"
)导致了程序崩溃,只得退出重启。
抛出异常,已记录到日志(log.log文件)
Traceback (most recent call last):
File "ChatClass.py", line 311, in run
File "Chatmain.py", line 1715, in getcommand_chat
File "Chatmain.py", line 1833, in commandchoice
File "Chatmain.py", line 619, in admin
File "ChatAllfind.py", line 704, in findallcontrol
File "ChatAllfind.py", line 638, in findallanswer
File "ChatAllfind.py", line 309, in delcl
ValueError: invalid literal for int() with base 10: ''
ChatLearning ->exit
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<getcommand_tui() done, defined at Chatmain.py:1738> exception=SystemExit(0)>
Traceback (most recent call last):
File "asyncio\tasks.py", line 258, in __step
File "prompt_toolkit\application\application.py", line 1066, in _poll_output_size
File "asyncio\tasks.py", line 654, in sleep
File "asyncio\futures.py", line 284, in __await__
File "asyncio\tasks.py", line 328, in __wakeup
File "asyncio\futures.py", line 196, in result
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "prompt_toolkit\application\application.py", line 1047, in cancel_and_wait_for_background_tasks
File "asyncio\futures.py", line 284, in __await__
File "asyncio\tasks.py", line 328, in __wakeup
File "asyncio\futures.py", line 196, in result
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "contextlib.py", line 135, in __exit__
File "nest_asyncio.py", line 127, in manage_run
File "nest_asyncio.py", line 75, in run_until_complete
File "nest_asyncio.py", line 111, in _run_once
File "asyncio\events.py", line 80, in _run
File "asyncio\tasks.py", line 331, in __wakeup
File "nest_asyncio.py", line 183, in step
File "asyncio\tasks.py", line 258, in __step
File "Chatmain.py", line 1761, in getcommand_tui
File "Chatmain.py", line 1850, in commandchoice
File "Chatmain.py", line 79, in exit
SystemExit: 0