求解为什么显示NoneBot 未安装 #580
Answered
by
yanyongyu
microNyako
asked this question in
问答
-
(bot) PS F:\bot\bot> nb run
使用 Python: F:\bot\bot\bot\Scripts\python.exe
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "F:\bot\bot\Scripts\nb.exe\__main__.py", line 7, in <module>
sys.exit(main())
~~~~^^
File "F:\bot\bot\Lib\site-packages\nb_cli\__main__.py", line 10, in main
anyio.run(cli_main, *args)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\anyio\_core\_eventloop.py", line 74, in run
return async_backend.run(func, args, {}, backend_options)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\anyio\_backends\_asyncio.py", line 2303, in run
return runner.run(wrapper())
~~~~~~~~~~^^^^^^^^^^^
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python313\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python313\Lib\asyncio\base_events.py", line 721, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "F:\bot\bot\Lib\site-packages\anyio\_backends\_asyncio.py", line 2291, in wrapper
return await func(*args)
^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\nb_cli\__init__.py", line 35, in cli_main
return await run_sync(cli_sync)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\nb_cli\cli\utils.py", line 63, in wrapper
return await anyio.to_thread.run_sync(partial(func, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
func, args, abandon_on_cancel=abandon_on_cancel, limiter=limiter
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "F:\bot\bot\Lib\site-packages\anyio\_backends\_asyncio.py", line 2461, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\anyio\_backends\_asyncio.py", line 962, in run
result = context.run(func, *args)
File "F:\bot\bot\Lib\site-packages\click\core.py", line 1161, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\click\core.py", line 1082, in main
rv = self.invoke(ctx)
File "F:\bot\bot\Lib\site-packages\click\core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\click\core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\click\core.py", line 788, in invoke
return __callback(*args, **kwargs)
File "F:\bot\bot\Lib\site-packages\nb_cli\cli\utils.py", line 71, in wrapper
return anyio.from_thread.run(partial(func, *args, **kwargs))
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\anyio\from_thread.py", line 59, in run
return async_backend.run_async_from_thread(func, args, token=token)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\anyio\_backends\_asyncio.py", line 2501, in run_async_from_thread
return f.result()
~~~~~~~~^^
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python313\Lib\concurrent\futures\_base.py", line 456, in result
return self.__get_result()
~~~~~~~~~~~~~~~~~^^
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python313\Lib\concurrent\futures\_base.py", line 401, in __get_result
raise self._exception
File "F:\bot\bot\Lib\site-packages\anyio\_backends\_asyncio.py", line 2488, in task_wrapper
return await func(*args)
^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\nb_cli\cli\commands\project.py", line 380, in run
proc = await run_project(exist_bot=Path(file))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\nb_cli\handlers\meta.py", line 50, in wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\nb_cli\handlers\meta.py", line 147, in wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\bot\bot\Lib\site-packages\nb_cli\handlers\meta.py", line 212, in wrapper
raise NoneBotError(_("NoneBot is not installed."))
nb_cli.exceptions.NoneBotError: NoneBot 未安装. |
Beta Was this translation helpful? Give feedback.
Answered by
yanyongyu
Mar 10, 2025
Replies: 2 comments 3 replies
-
你是否在创建项目的时候选择了创建虚拟环境?以及是否选择了立即安装?另外安装是否成功? |
Beta Was this translation helpful? Give feedback.
3 replies
-
我捣鼓下过后好像莫名其妙的解决了) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你的驱动器选择错误吧,请根据你的适配器需求选择驱动器。如:fastapi、httpx、websockets