今天安装dify新版报错。 #1097

Closed
opened 2026-02-21 17:29:58 -05:00 by yindo · 2 comments
Owner

Originally created by @limuan123123 on GitHub (Feb 23, 2024).

Self Checks

  • 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).
  • Pleas do not modify this template :) and fill in all the required fields.

Provide a description of the help you need

本地安装dify,在执行flask db upgrade是报错了:ValueError: RESEND_API_KEY is not set。
请问这个RESEND_API_KEY 参数需要填什么? 谢谢
Uploading 0c49cfbe9cf9e596493f84c19d85d1d.png…

Originally created by @limuan123123 on GitHub (Feb 23, 2024). ### Self Checks - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Pleas do not modify this template :) and fill in all the required fields. ### Provide a description of the help you need 本地安装dify,在执行flask db upgrade是报错了:ValueError: RESEND_API_KEY is not set。 请问这个RESEND_API_KEY 参数需要填什么? 谢谢 ![Uploading 0c49cfbe9cf9e596493f84c19d85d1d.png…]()
yindo closed this issue 2026-02-21 17:29:58 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 23, 2024):

🤖

嘿,@limuan123123!很高兴再次见到你。遇到新问题了吗?来聊聊吧!

RESEND_API_KEY 参数应填写由 Resend.io 服务提供的 API 密钥。此密钥用于将您的应用程序与 Resend.io 服务进行身份验证。如果您没有此密钥,您应在 Resend.io 上创建一个帐户并生成一个。

一旦您有了 API 密钥,您可以在应用程序的配置中设置 RESEND_API_KEY 参数。这可以在配置文件中完成,也可以作为环境变量完成,具体取决于您的应用程序如何设置。

您看到的 ValueError 是在应用程序的配置中没有设置 RESEND_API_KEY 时引发的,如下面的代码片段所示:

api_key = app.config.get('RESEND_API_KEY')
if not api_key:
    raise ValueError('RESEND_API_KEY is not set')

这意味着应用程序无法在其配置中找到 RESEND_API_KEY。为了解决这个问题,确保在应用程序的配置中正确设置了 RESEND_API_KEY

源代码:

关于 RESEND_API_KEY 在 dify 代码库中的确切功能,我在仓库中没有找到答案,但答案可能在其他地方可用,或者我可能错过了它。

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot[bot] commented on GitHub (Feb 23, 2024): _🤖_ <!-- Greeting --> 嘿,@limuan123123!很高兴再次见到你。遇到新问题了吗?来聊聊吧! <!-- Answer --> `RESEND_API_KEY` 参数应填写由 Resend.io 服务提供的 API 密钥。此密钥用于将您的应用程序与 Resend.io 服务进行身份验证。如果您没有此密钥,您应在 Resend.io 上创建一个帐户并生成一个。 一旦您有了 API 密钥,您可以在应用程序的配置中设置 `RESEND_API_KEY` 参数。这可以在配置文件中完成,也可以作为环境变量完成,具体取决于您的应用程序如何设置。 您看到的 ValueError 是在应用程序的配置中没有设置 `RESEND_API_KEY` 时引发的,如下面的代码片段所示: ```py api_key = app.config.get('RESEND_API_KEY') if not api_key: raise ValueError('RESEND_API_KEY is not set') ``` 这意味着应用程序无法在其配置中找到 `RESEND_API_KEY`。为了解决这个问题,确保在应用程序的配置中正确设置了 `RESEND_API_KEY`。 源代码: - [api/extensions/ext_mail.py](https://github.com/langgenius/dify/blob/main/api/extensions/ext_mail.py) 关于 `RESEND_API_KEY` 在 dify 代码库中的确切功能,我在仓库中没有找到答案,但答案可能在其他地方可用,或者我可能错过了它。 ## Sources - [api/extensions/ext_mail.py](https://github.com/langgenius/dify/blob/main/api/extensions/ext_mail.py) <!-- Dosu Comment Footer --> <details open> <summary> #### About Dosu </summary> This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. </details>
Author
Owner

@crazywoola commented on GitHub (Feb 23, 2024):

Close. due to https://github.com/langgenius/dify/issues/1542, also set the RESEND_API_KEY in .env in api/ folder.

@crazywoola commented on GitHub (Feb 23, 2024): Close. due to https://github.com/langgenius/dify/issues/1542, also set the `RESEND_API_KEY ` in `.env` in api/ folder.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#1097