You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
[FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
Please do not modify this template :) and fill in all the required fields.
Dify version
Version 0.14.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Add Alibaba and Huawei ocs sdk
alibabacloud_ocr_api20210707==3.1.2
huaweicloudsdkcore==3.1.127
huaweicloudsdkocr==3.1.127
Run the following code
import json
from alibabacloud_ocr_api20210707.client import Client as ocr_api20210707Client
from alibabacloud_tea_openapi import models as open_api_models
from alibabacloud_ocr_api20210707 import models as ocr_api_20210707_models
from alibabacloud_tea_util import models as util_models
from alibabacloud_tea_util.client import Client as UtilClient
Prompt error: “error: operation not permitted”
I run python ocr.py directly in the container and it works, but an error message appears in the workflow.
✔️ Expected Behavior
I hope to execute simple python code in the workflow, such as calling api and executing sdk.
❌ Actual Behavior
Unable to run sdk.
The text was updated successfully, but these errors were encountered:
Hey @xuemusi! 👋 I'm here to help you with any bugs, questions, or contributions you have for Dify. Let's squash those bugs together!
The error message "operation not permitted" when running the Alibaba OCR SDK within a Dify workflow is likely due to the security restrictions of the DifySandbox. This sandbox environment enforces strict security measures, including a whitelist policy for system calls and isolated file system access, which might be preventing certain operations required by the SDK [1][2].
To resolve this issue, you can try the following steps:
Check Permissions: Ensure that the operations required by the Alibaba OCR SDK are allowed within the DifySandbox. You might need to adjust the configuration to permit specific actions if they are currently restricted.
Network Configuration: Verify that the network settings within the sandbox allow the necessary API calls. Dify uses network isolation strategies, and you may need to configure the ssrf_proxy service or Egress policies to allow the SDK's network requests [2][3].
Error Handling: Implement error handling in your workflow to capture and manage any exceptions that occur due to these restrictions. This can help in identifying specific operations that are not permitted and adjusting your code or configuration accordingly [4].
If these steps do not resolve the issue, you may need to review the specific system calls and network requests made by the SDK to ensure they align with the sandbox's security policies.
Self Checks
Dify version
Version 0.14.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
alibabacloud_ocr_api20210707==3.1.2
huaweicloudsdkcore==3.1.127
huaweicloudsdkocr==3.1.127
Prompt error: “error: operation not permitted”
✔️ Expected Behavior
I hope to execute simple python code in the workflow, such as calling api and executing sdk.
❌ Actual Behavior
Unable to run sdk.
The text was updated successfully, but these errors were encountered: