mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
Azure DALL-e failing on v1.0.1 - 'base64' is not defined #81
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jonjonhui on GitHub (Mar 14, 2025).
Self Checks
Dify version
1.0.1
Cloud or Self Hosted
Cloud, Self Hosted (Docker)
Steps to reproduce
✔️ Expected Behavior
Azure Dall-E successfully returns an image
❌ Actual Behavior
This error is thrown.
{"azure_dalle3": "tool invoke error: PluginInvokeError: {"args":{},"error_type":"NameError","message":"name 'base64' is not defined"}"}
@dosubot[bot] commented on GitHub (Mar 14, 2025):
@jonjonhui Hello! I'm here to help you with bugs, questions, and becoming a contributor. Let me know how I can assist you while you wait for a human maintainer.
The error you're encountering, "name 'base64' is not defined," suggests that the
base64module is not being imported in the context where it's needed for the Azure DALL-e integration. In the Dify codebase, thebase64module is typically imported using the following statement:This import is necessary for decoding base64-encoded image data received from the DALL-e API [1][2].
To resolve this issue, ensure that the
base64module is correctly imported in the file where the Azure DALL-e tool is implemented. You should check the relevant file for theDallE3Toolclass and verify that the import statement is present and correctly placed at the top of the file. If it's missing, add the import statement to fix theNameError.To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@crazywoola commented on GitHub (Mar 16, 2025):
I can not reproduce this error.
Can you try to reinstall it again?
@skimhiro commented on GitHub (Mar 16, 2025):
An issue with attachment is occurring with Azure Dalle-E.
DallE import
Azure DallE import
@jonjonhui commented on GitHub (Mar 16, 2025):
My issue is with Azure Dall-E not Dall-E
@skimhiro commented on GitHub (Mar 17, 2025):
I was able to confirm that it worked by changing the import statements.
tools/azuredalle/tools/dalle3.py
from base64 import b64decode --> import base64