Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dify APIServer: Not applying SDK defaults from location #8563

Closed
5 tasks done
Enchante503 opened this issue Sep 19, 2024 · 3 comments
Closed
5 tasks done

Dify APIServer: Not applying SDK defaults from location #8563

Enchante503 opened this issue Sep 19, 2024 · 3 comments
Labels
🐞 bug Something isn't working

Comments

@Enchante503
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • 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

dify-web@0.8.2

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

sagemaker.config INFO - Not applying SDK defaults from location: /etc/xdg/sagemaker/config.yaml sagemaker.config INFO - Not applying SDK defaults from location: /home/uer/.config/sagemaker/config.yaml WARNING [MainThread] [ext_mail.py:51] - MAIL_TYPE is not set
When I launch DifyAPIServer, I get a warning message. How can I solve this?

✔️ Expected Behavior

Dify APIServer starts normally

❌ Actual Behavior

When I launch DifyAPIServer, I get a warning message.

Copy link

dosubot bot commented Sep 19, 2024

The warning messages you're encountering are related to the sagemaker.config file and the MAIL_TYPE setting.

  1. sagemaker.config Warnings:

    • The messages indicate that the SDK defaults are not being applied from the specified locations (/etc/xdg/sagemaker/config.yaml and /home/user/.config/sagemaker/config.yaml). Unfortunately, there is no specific information available in the repository about the role of the sagemaker.config file or why these defaults might not be applying.
  2. MAIL_TYPE Warning:

    • The MAIL_TYPE setting specifies the type of mail service to be used for sending emails. It can be set to either resend or smtp. You need to configure this setting in your environment variables to avoid the warning.

Here are the configurations for each MAIL_TYPE:

  • resend:

    • MAIL_DEFAULT_SEND_FROM: The sender's email name (optional).
    • RESEND_API_KEY: The API key for the Resend mail provider.
    • RESEND_API_URL: The API URL for the Resend mail provider (optional, default is https://api.resend.com).
  • smtp:

    • SMTP_SERVER: The SMTP server address.
    • SMTP_PORT: The SMTP server port number.
    • SMTP_USERNAME: The SMTP username.
    • SMTP_PASSWORD: The SMTP password.
    • SMTP_USE_TLS: Whether to use TLS (default is false).
    • MAIL_DEFAULT_SEND_FROM: The sender's email name (optional).

Ensure you set the MAIL_TYPE and its corresponding configurations in your environment variables to resolve the warning [1][2].

For the sagemaker.config issue, you might need to check if the configuration files exist at the specified locations and if they contain the correct settings. If the problem persists, further investigation into the specific usage of sagemaker.config within the DifyAPIServer codebase might be necessary.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the 🐞 bug Something isn't working label Sep 19, 2024
@Enchante503
Copy link
Author

Enchante503 commented Sep 19, 2024

Hello
Thank you for your reply.
The solution to the sagemaker issue can be found at the following URL.https://stackoverflow.com/questions/77119831/sagemaker-sdk-on-lambda-function

or
pip install sagemaker==2.182.0

@kurokobo
Copy link
Contributor

As stated in the logs, the message about sagemaker is just INFO instead of WARNING. You can safely ignore that.

sagemaker.config 👉INFO👈 - Not applying SDK defaults from location: /etc/xdg/sagemaker/config.yaml
sagemaker.config 👉INFO👈 - Not applying SDK defaults from location: /home/uer/.config/sagemaker/config.yaml
WARNING [MainThread] [ext_mail.py:51] - MAIL_TYPE is not set

The only WARNING you can see is for MAIL_TYPE, this is completely different from sagemaker-thing. If you want to suppress this, please ensure that you have MAIL_TYPE env configured: https://github.com/langgenius/dify/blob/0.8.2/docker/.env.example#L523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants