[BUG] docker compose 安装运行, ValueError: Exception is not allowed in handle_exceptions
sunrisewestern opened this issue · 1 comments
sunrisewestern commented
Describe the bug
docker compose 安装运行时,报错ValueError: Exception is not allowed in handle_exceptions
Log
2024-01-16 21:55:17.985 | SUCCESS | llmkira.sdk.openapi.transducer:decorator:30 - 📦 [Plugin Builder transfer] DefaultMessageBuilder
2024-01-16 21:55:17.986 | SUCCESS | llmkira.sdk.openapi.transducer:decorator:33 - 📦 [Plugin Parser transfer] DefaultMessageParser
2024-01-16 21:55:18.025 | ERROR | llmkira.sdk.func_calling.model:load_plugin:159 - Failed to import "search"
Traceback (most recent call last):
File "/app/start_receiver.py", line 69, in <module>
app.run()
│ └ <function run at 0x7fd440408540>
└ <module 'llmkira.receiver.app' from '/app/llmkira/receiver/app.py'>
File "/app/llmkira/receiver/app.py", line 49, in run
load_plugins("llmkira/extra/plugins")
└ <function load_plugins at 0x7fd43ea2d6c0>
File "/app/llmkira/sdk/func_calling/loader.py", line 36, in load_plugins
return manager.load_all_plugins()
│ └ <function PluginManager.load_all_plugins at 0x7fd43e9b6fc0>
└ PluginManager(plugins=set(), search_path={'llmkira/extra/plugins'})
File "/app/llmkira/sdk/func_calling/model.py", line 166, in load_all_plugins
return set(
File "/app/llmkira/sdk/func_calling/model.py", line 167, in <genexpr>
filter(None, (self.load_plugin(name) for name in self.available_plugins))
│ │ │ │ │ └ <property object at 0x7fd43ea33330>
│ │ │ │ └ PluginManager(plugins=set(), search_path={'llmkira/extra/plugins'})
│ │ │ └ 'search'
│ │ └ 'search'
│ └ <function PluginManager.load_plugin at 0x7fd43e9b7060>
└ PluginManager(plugins=set(), search_path={'llmkira/extra/plugins'})
> File "/app/llmkira/sdk/func_calling/model.py", line 138, in load_plugin
module = importlib.import_module(
│ └ <function import_module at 0x7fd440ff7100>
└ <module 'importlib' from '/usr/local/lib/python3.11/importlib/__init__.py'>
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'llmkira.extra.plugins.search'
│ └ <function _gcd_import at 0x7fd44111fd80>
└ <module '_frozen_importlib' (frozen)>
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 "/app/llmkira/sdk/func_calling/model.py", line 240, in exec_module
super().exec_module(module)
└ <module 'llmkira.extra.plugins.search' from '/app/llmkira/extra/plugins/search.py'>
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/app/llmkira/extra/plugins/search.py", line 43, in <module>
@resign_plugin_executor(function=search)
│ └ Function(name='search_in_google', description='Search/validate on google.com.[ONLY IF NECESSARY]', parameters=Parameters(type...
└ <function resign_plugin_executor at 0x7fd43c843ec0>
File "/app/llmkira/sdk/openapi/fuse/__init__.py", line 57, in resign_plugin_executor
raise ValueError("Exception is not allowed in handle_exceptions")
ValueError: Exception is not allowed in handle_exceptions
2024-01-16 21:55:18.094 | ERROR | llmkira.sdk.func_calling.model:load_plugin:159 - Failed to import "sticker"
Traceback (most recent call last):
File "/app/start_receiver.py", line 69, in <module>
app.run()
│ └ <function run at 0x7fd440408540>
└ <module 'llmkira.receiver.app' from '/app/llmkira/receiver/app.py'>
File "/app/llmkira/receiver/app.py", line 49, in run
load_plugins("llmkira/extra/plugins")
└ <function load_plugins at 0x7fd43ea2d6c0>
File "/app/llmkira/sdk/func_calling/loader.py", line 36, in load_plugins
return manager.load_all_plugins()
│ └ <function PluginManager.load_all_plugins at 0x7fd43e9b6fc0>
└ PluginManager(plugins=set(), search_path={'llmkira/extra/plugins'})
File "/app/llmkira/sdk/func_calling/model.py", line 166, in load_all_plugins
return set(
File "/app/llmkira/sdk/func_calling/model.py", line 167, in <genexpr>
filter(None, (self.load_plugin(name) for name in self.available_plugins))
│ │ │ │ │ └ <property object at 0x7fd43ea33330>
│ │ │ │ └ PluginManager(plugins=set(), search_path={'llmkira/extra/plugins'})
│ │ │ └ 'sticker'
│ │ └ 'sticker'
│ └ <function PluginManager.load_plugin at 0x7fd43e9b7060>
└ PluginManager(plugins=set(), search_path={'llmkira/extra/plugins'})
> File "/app/llmkira/sdk/func_calling/model.py", line 138, in load_plugin
module = importlib.import_module(
│ └ <function import_module at 0x7fd440ff7100>
└ <module 'importlib' from '/usr/local/lib/python3.11/importlib/__init__.py'>
File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
│ │ │ │ │ └ 0
│ │ │ │ └ None
│ │ │ └ 0
│ │ └ 'llmkira.extra.plugins.sticker'
│ └ <function _gcd_import at 0x7fd44111fd80>
└ <module '_frozen_importlib' (frozen)>
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 "/app/llmkira/sdk/func_calling/model.py", line 240, in exec_module
super().exec_module(module)
└ <module 'llmkira.extra.plugins.sticker' from '/app/llmkira/extra/plugins/sticker.py'>
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/app/llmkira/extra/plugins/sticker.py", line 57, in <module>
@resign_plugin_executor(function=sticker)
│ └ Function(name='convert_to_sticker', description='Help user convert pictures to stickers', parameters=Parameters(type='object'...
└ <function resign_plugin_executor at 0x7fd43c843ec0>
File "/app/llmkira/sdk/openapi/fuse/__init__.py", line 57, in resign_plugin_executor
raise ValueError("Exception is not allowed in handle_exceptions")
ValueError: Exception is not allowed in handle_exceptions
2024-01-16 21:55:18.284 | INFO | llmkira.sdk.func_calling.model:load_plugin:149 - ✨ Succeeded to load plugin "alarm" from "llmkira.extra.plugins.alarm"
2024-01-16 21:55:18.411 | SUCCESS | llmkira.receiver.app:run:53 -
===========Third Party Plugins Loaded==========
- Secret in the Log has been deleted
Info
Version: c2428ea
sudoskys commented
已收到您的反馈,此问题的分析如下:
此问题并不影响程序的正常运行,为插件系统的搜索插件报错导致,当前生产版本的搜索插件含有一些在测试版本中修复的问题,会导致问题的发生。
此问题预计于合并 dev 分支后修复。请耐心等待