Skip to content

[Bug] skill如果pytho脚本有pymysql会报找不到依赖 #6182

@truthsun22

Description

@truthsun22

Contact Information

No response

MaxKB Version

v2.10.0-lts

Problem Description

我看dockerfile里已经设置允许用pymysql依赖了,但是如果skill包含python脚本中有import pymysql,会报找不到依赖。SandboxShellBackend类中,一开始会把python环境路径放到PATH中,但是在execute却又清空了PATH。这导致skill执行python脚本时无法找到/opt/maxkb-app/sandbox/python-packages

Steps to Reproduce

随便写一个skill,里面的python脚本只要import pymysql就行

The expected correct result

No response

Related log output

Additional Information

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions