@daisy524 在 ChatLearning——让bot学会你的群聊 中说:
@Wangs121 nohup python ./Chatmain.py &
谢谢!
发现虽然会报错,但私聊指令依然能运行
nohub.out
中的内容如下
Warning: Input is not a terminal (fd=0).
欢迎使用ChatLearning应用 版本号: 1.1.5
输入help来查看指令列表吧!
Traceback (most recent call last):
File "/usr/lib/python3.8/asyncio/selector_events.py", line 261, in _add_reader
key = self._selector.get_key(fd)
File "/usr/lib/python3.8/selectors.py", line 192, in get_key
raise KeyError("{!r} is not registered".format(fileobj)) from None
KeyError: '0 is not registered'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/input/vt100.py", line 173, in _attached_input
loop.add_reader(fd, callback_wrapper)
File "/usr/lib/python3.8/asyncio/selector_events.py", line 334, in add_reader
return self._add_reader(fd, callback, *args)
File "/usr/lib/python3.8/asyncio/selector_events.py", line 263, in _add_reader
self._selector.register(fd, selectors.EVENT_READ,
File "/usr/lib/python3.8/selectors.py", line 359, in register
self._selector.register(key.fd, poller_events)
PermissionError: [Errno 1] Operation not permitted
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./Chatmain.py", line 813, in <module>
loop.run_until_complete(getcommand_tui())
File "/usr/local/lib/python3.8/dist-packages/nest_asyncio.py", line 81, in run_until_complete
return f.result()
File "/usr/lib/python3.8/asyncio/futures.py", line 178, in result
raise self._exception
File "/usr/lib/python3.8/asyncio/tasks.py", line 282, in __step
result = coro.throw(exc)
File "./Chatmain.py", line 730, in getcommand_tui
command = await session.prompt_async('\nChatLearning ->')
File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/shortcuts/prompt.py", line 1224, in prompt_async
return await self.app.run_async(set_exception_handler=set_exception_handler)
File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/application/application.py", line 856, in run_async
return await _run_async2()
File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/application/application.py", line 826, in _run_async2
result = await _run_async()
File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/application/application.py", line 741, in _run_async
with self.input.raw_mode(), self.input.attach(
File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/usr/local/lib/python3.8/dist-packages/prompt_toolkit/input/vt100.py", line 182, in _attached_input
raise EOFError
EOFError