Please answer some questions before submitting your issue. Thanks!
Which version of XXL-JOB do you using?
Expected behavior
通过XXL-JOB定时执行python脚本,出现python三方库未导入的情况,应该如何解决?
Actual behavior
Steps to reproduce the behavior
Other information
异常信息如下:
2021-12-22 16:51:13 [com.xxl.job.core.thread.JobThread#run]-[130]-[Thread-23]
----------- xxl-job job execute start -----------
----------- Param:
2021-12-22 16:51:13 [com.xxl.job.core.handler.impl.ScriptJobHandler#execute]-[80]-[Thread-23] ----------- script file:/apps/logs/jobhandler/gluesource/10_1640163065000.py -----------
Traceback (most recent call last):
File "/apps/logs/jobhandler/gluesource/10_1640163065000.py", line 13, in
import enum
ImportError: No module named enum
2021-12-22 16:51:13 [com.xxl.job.core.thread.JobThread#run]-[176]-[Thread-23]
----------- xxl-job job execute end(finish) -----------
----------- Result: handleCode=500, handleMsg = script exit value(1) is failed
2021-12-22 16:51:13 [com.xxl.job.core.thread.TriggerCallbackThread#callbackLog]-[197]-[xxl-job, executor TriggerCallbackThread]
----------- xxl-job job callback finish.
[Load Log Finish]
1条答案
按热度按时间v64noz0r1#
可能是因为你的宿主机上没有安装 python程序运行需要的依赖库,可以先手动 安装好之后,在试下