base64 error #5523

Closed
opened 2026-02-21 18:11:25 -05:00 by yindo · 5 comments
Owner

Originally created by @Sbazar-GmbH on GitHub (Sep 10, 2024).

Originally assigned to: @crazywoola on GitHub.

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

0.7.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image

We are experiencing a ModuleNotFoundError: No module named 'base64' in our self-hosted DIFY AI setup using Docker. This error occurs despite base64 being part of Python's standard library. The issue arises when running a Python script, and it persists across different environments. We've verified the Python version and rebuilt the Docker image, but the problem remains unresolved. Assistance in identifying potential misconfigurations or overlooked steps would be appreciated.

✔️ Expected Behavior

this code block should work properly

Actual Behavior

every time i do something it shows me this error only in the code block, if i try out the javascript then also it doesnt work:

image

Originally created by @Sbazar-GmbH on GitHub (Sep 10, 2024). Originally assigned to: @crazywoola on GitHub. ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [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] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.7.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![image](https://github.com/user-attachments/assets/ea2165da-3321-46ca-88d2-6e719fe4e0a3) We are experiencing a ModuleNotFoundError: No module named 'base64' in our self-hosted DIFY AI setup using Docker. This error occurs despite base64 being part of Python's standard library. The issue arises when running a Python script, and it persists across different environments. We've verified the Python version and rebuilt the Docker image, but the problem remains unresolved. Assistance in identifying potential misconfigurations or overlooked steps would be appreciated. ### ✔️ Expected Behavior this code block should work properly ### ❌ Actual Behavior every time i do something it shows me this error only in the code block, if i try out the javascript then also it doesnt work: ![image](https://github.com/user-attachments/assets/dee91ac6-95c7-4c2e-a33a-a139adbd364b)
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:11:25 -05:00
yindo closed this issue 2026-02-21 18:11:25 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 10, 2024):

Hello, @Sbazar-GmbH! I'm here to help you with bug fixes, answer your questions, and guide you on how to contribute.

I found a similar closed issue that might help you resolve the ModuleNotFoundError for the base64 module. The issue was resolved by upgrading the sandbox to version 0.2.6. Here are the steps to upgrade:

  1. Navigate to the Docker directory in the Dify source code:

    cd dify/docker
    
  2. Stop the running Docker containers:

    docker compose down
    
  3. Pull the latest changes from the main branch:

    git pull origin main
    
  4. Pull the latest Docker images:

    docker compose pull
    
  5. Start the Docker containers:

    docker compose up -d
    
  6. Sync Environment Variable Configuration:

    • If the .env.example file has been updated, modify your local .env file accordingly.
    • Check and modify the configuration items in the .env file as needed to ensure they match your actual environment. Add any new variables from .env.example to your .env file and update any values that have changed.

This should resolve the ModuleNotFoundError for the base64 module [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 10, 2024): <!-- Greeting --> Hello, @Sbazar-GmbH! I'm here to help you with bug fixes, answer your questions, and guide you on how to contribute. <!-- Answer --> I found a similar closed issue that might help you resolve the `ModuleNotFoundError` for the `base64` module. The issue was resolved by upgrading the sandbox to version 0.2.6. Here are the steps to upgrade: 1. **Navigate to the Docker directory in the Dify source code:** ```bash cd dify/docker ``` 2. **Stop the running Docker containers:** ```bash docker compose down ``` 3. **Pull the latest changes from the main branch:** ```bash git pull origin main ``` 4. **Pull the latest Docker images:** ```bash docker compose pull ``` 5. **Start the Docker containers:** ```bash docker compose up -d ``` 6. **Sync Environment Variable Configuration:** - If the `.env.example` file has been updated, modify your local `.env` file accordingly. - Check and modify the configuration items in the `.env` file as needed to ensure they match your actual environment. Add any new variables from `.env.example` to your `.env` file and update any values that have changed. This should resolve the `ModuleNotFoundError` for the `base64` module <sup>[[1]](https://github.com/langgenius/dify/issues/8151)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@cubxxw commented on GitHub (Sep 10, 2024):

@Sbazar-GmbH How can I solve this problem

@cubxxw commented on GitHub (Sep 10, 2024): @Sbazar-GmbH How can I solve this problem
Author
Owner

@crazywoola commented on GitHub (Sep 10, 2024):

Check the sandbox image version. It should be greater than 0.2.6. If you see 0.2.1 then you need to pull the latest image and restart the application again. @cubxxw @Sbazar-GmbH

@crazywoola commented on GitHub (Sep 10, 2024): Check the sandbox image version. It should be greater than 0.2.6. If you see 0.2.1 then you need to pull the latest image and restart the application again. @cubxxw @Sbazar-GmbH
Author
Owner

@cubxxw commented on GitHub (Sep 10, 2024):

Thank you. I've taken care of it

@cubxxw commented on GitHub (Sep 10, 2024): Thank you. I've taken care of it
Author
Owner

@zhenghaolun commented on GitHub (Dec 9, 2024):

My sandbox image version is latest (0.2.10), however, it also cannot work.
I also tried version 0.2.6 and it still doesn't work.

@zhenghaolun commented on GitHub (Dec 9, 2024): My sandbox image version is latest (0.2.10), however, it also cannot work. I also tried version 0.2.6 and it still doesn't work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5523