AnzhiZhang / MCDReforgedPlugins

MCDReforged Plugins
GNU General Public License v3.0
95 stars 57 forks source link

[Bot]: Fail to load the entry point of bot@1.1.1 #161

Closed SkyIce0229 closed 10 months ago

SkyIce0229 commented 10 months ago

加了Bot的依赖后出现以下问题: Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mcdreforged\plugin\type\multi_file_plugin.py", line 88, in _on_ready self._load_entry_instance() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mcdreforged\plugin\type\regular_plugin.py", line 66, in _load_entry_instance self.entry_module_instance = self._import_entrypoint_module() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\site-packages\mcdreforged\plugin\type\multi_file_plugin.py", line 56, in _import_entrypoint_module mod = importlib.import_module(self.get_metadata().entrypoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1204, in _gcd_import File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "plugins\Bot-v1.1.1.mcdr\bot\__init__.py", line 1, in <module> from bot.plugin import Plugin File "plugins\Bot-v1.1.1.mcdr\bot\plugin.py", line 6, in <module> from bot.fastapi_manager import FastAPIManager File "plugins\Bot-v1.1.1.mcdr\bot\fastapi_manager.py", line 3, in <module> from pydantic import BaseModel, Field, conlist ModuleNotFoundError: No module named 'pydantic'

SkyIce0229 commented 10 months ago

已解决,需要自己手动pip install pydantic,希望readme的依赖一栏写的更详细点

AnzhiZhang commented 10 months ago

pydanticfastapi 的依赖,如果安装了 fastapi 正常情况下会自动安装 pydantic