apisix-python-plugin-runner icon indicating copy to clipboard operation
apisix-python-plugin-runner copied to clipboard

自定义插件不能使用

Open coolmingwu opened this issue 3 years ago • 2 comments

2022/07/07 08:03:56 [warn] 43#43: *23 [lua] init.lua:913: 2022-07-07 08:03:56,810 - ERROR - execute plugin stop TypeError, ("'NoneType' object is not callable",) , context: ngx.timer 2022/07/07 08:05:16 [warn] 43#43: *23 [lua] init.lua:913: 2022-07-07 08:05:16,691 - ERROR - execute plugin stop TypeError, ("'NoneType' object is not callable",)

coolmingwu avatar Jul 07 '22 08:07 coolmingwu

Can you give me information about the version of APISIX, custom plugins, etc., so that I can help you locate the problem?

SkyeYoung avatar Jul 15 '22 06:07 SkyeYoung

我也出现这个问题,使用Development Mode启动测试正常,用Production Mode就会报错,测试复制stop.py改名一样如此,并非插件代码问题。但我的apisix-python-plugin-runner是使用了pyenv启动的,我不知道是否这影响了。测试得出是Production Mode启动缺少 export PYTHONPATH=/usr/local/apisix/apisix-python-plugin-runner 变量就会导致错误。我使用一个shell脚本添加上面变量并修改config.yaml,用shell脚本启动解决了。

113998274 avatar Jan 09 '23 08:01 113998274