STORAGE_TYPE: azure-blob, results in "Please specify a container name" error #3555

Closed
opened 2026-02-21 17:59:14 -05:00 by yindo · 0 comments
Owner

Originally created by @zolgear on GitHub (May 22, 2024).

Originally assigned to: @JohnJyong 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).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.8

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Set STORAGE_TYPE to 'azure-blob'. and set AZURE_BLOB_~.
  2. Run docker compose.
  3. Observe the error message: "Please specify a container name."

image

api log:

2024-05-22 05:07:00.343 ERROR [Dummy-2] [app_service.py:97] - Please specify a container name.
Traceback (most recent call last):
  File "/app/api/services/app_service.py", line 90, in create_app
    model_instance = model_manager.get_default_model_instance(
  File "/app/api/core/model_manager.py", line 244, in get_default_model_instance
    default_model_entity = self._provider_manager.get_default_model(
  File "/app/api/core/provider_manager.py", line 227, in get_default_model
    provider_configurations = self.get_configurations(tenant_id)
  File "/app/api/core/provider_manager.py", line 118, in get_configurations
    custom_configuration = self._to_custom_configuration(
  File "/app/api/core/provider_manager.py", line 562, in _to_custom_configuration
    self.decoding_rsa_key, self.decoding_cipher_rsa = encrypter.get_decrypt_decoding(tenant_id)
  File "/app/api/core/helper/encrypter.py", line 29, in get_decrypt_decoding
    return rsa.get_decrypt_decoding(tenant_id)
  File "/app/api/libs/rsa.py", line 55, in get_decrypt_decoding
    private_key = storage.load(filepath)
  File "/app/api/extensions/ext_storage.py", line 45, in load
    return self.load_once(filename)
  File "/app/api/extensions/ext_storage.py", line 48, in load_once
    return self.storage_runner.load_once(filename)
  File "/app/api/extensions/storage/azure_storage.py", line 32, in load_once
    blob = self.client.get_container_client(container=self.bucket_name)
  File "/usr/local/lib/python3.10/site-packages/azure/storage/blob/_blob_service_client.py", line 673, in get_container_client
    return ContainerClient(
  File "/usr/local/lib/python3.10/site-packages/azure/storage/blob/_container_client.py", line 148, in __init__
    raise ValueError("Please specify a container name.")
ValueError: Please specify a container name.

https://github.com/Azure/azure-sdk-for-python/blob/ec92c6381df22b599e0b8090f17b959a643d3c84/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py#L158

Isn't container_name required for initializing the ContainerClient class?

Untested fix. https://github.com/langgenius/dify/commit/fd0df047a3d6838a631d6deb3e18d1e17be32354

ref: #2919

✔️ Expected Behavior

Not error.

Actual Behavior

No response

Originally created by @zolgear on GitHub (May 22, 2024). Originally assigned to: @JohnJyong 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] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.8 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Set STORAGE_TYPE to 'azure-blob'. and set AZURE_BLOB_~. 2. Run docker compose. 3. Observe the error message: "Please specify a container name." ![image](https://github.com/langgenius/dify/assets/35589743/5d82949c-0d53-442d-9560-bb58841af658) api log: ``` 2024-05-22 05:07:00.343 ERROR [Dummy-2] [app_service.py:97] - Please specify a container name. Traceback (most recent call last): File "/app/api/services/app_service.py", line 90, in create_app model_instance = model_manager.get_default_model_instance( File "/app/api/core/model_manager.py", line 244, in get_default_model_instance default_model_entity = self._provider_manager.get_default_model( File "/app/api/core/provider_manager.py", line 227, in get_default_model provider_configurations = self.get_configurations(tenant_id) File "/app/api/core/provider_manager.py", line 118, in get_configurations custom_configuration = self._to_custom_configuration( File "/app/api/core/provider_manager.py", line 562, in _to_custom_configuration self.decoding_rsa_key, self.decoding_cipher_rsa = encrypter.get_decrypt_decoding(tenant_id) File "/app/api/core/helper/encrypter.py", line 29, in get_decrypt_decoding return rsa.get_decrypt_decoding(tenant_id) File "/app/api/libs/rsa.py", line 55, in get_decrypt_decoding private_key = storage.load(filepath) File "/app/api/extensions/ext_storage.py", line 45, in load return self.load_once(filename) File "/app/api/extensions/ext_storage.py", line 48, in load_once return self.storage_runner.load_once(filename) File "/app/api/extensions/storage/azure_storage.py", line 32, in load_once blob = self.client.get_container_client(container=self.bucket_name) File "/usr/local/lib/python3.10/site-packages/azure/storage/blob/_blob_service_client.py", line 673, in get_container_client return ContainerClient( File "/usr/local/lib/python3.10/site-packages/azure/storage/blob/_container_client.py", line 148, in __init__ raise ValueError("Please specify a container name.") ValueError: Please specify a container name. ``` https://github.com/Azure/azure-sdk-for-python/blob/ec92c6381df22b599e0b8090f17b959a643d3c84/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py#L158 Isn't container_name required for initializing the ContainerClient class? Untested fix. https://github.com/langgenius/dify/commit/fd0df047a3d6838a631d6deb3e18d1e17be32354 ref: #2919 ### ✔️ Expected Behavior Not error. ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 17:59:14 -05:00
yindo closed this issue 2026-02-21 17:59:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#3555