"Add New Provider" encountered a bug. #177

Closed
opened 2026-02-16 10:18:21 -05:00 by yindo · 1 comment
Owner

Originally created by @Uhao-P on GitHub (Apr 8, 2025).

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

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

class XinferenceProvider(Provider):
    def validate_provider_credentials(self, credentials: dict) -> None:
        pass

✔️ Expected Behavior

No response

Actual Behavior

"Cannot find __base.provider.Provider."

Originally created by @Uhao-P on GitHub (Apr 8, 2025). ### 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 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ```python class XinferenceProvider(Provider): def validate_provider_credentials(self, credentials: dict) -> None: pass ``` ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior "Cannot find __base.provider.Provider."
yindo closed this issue 2026-02-16 10:18:21 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 8, 2025):

The error "Cannot find __base.provider.Provider" typically indicates an issue with the import or module resolution in your code. Here are a few steps to help resolve this issue in the context of Dify:

  1. Check Import Paths: Ensure that the Provider class is correctly imported in your code. Verify that the import statement matches the actual path where the Provider class is defined.

  2. Module Structure: Make sure that the module structure is correctly set up. The Provider class should be located in a module that is accessible from where you are trying to use it. You might need to adjust the import statement to reflect the correct path.

  3. Verify Provider Class Location: If you are unsure about the location of the Provider class, you might need to search through the codebase to find its exact definition and path. This will help you correct the import statement.

  4. Environment Configuration: Ensure that your Python environment is correctly set up and that all necessary dependencies are installed. Sometimes, issues with the environment can lead to import errors.

If these steps do not resolve the issue, you might want to check the Dify documentation or codebase for any specific configurations or settings related to the 'provider' module that might affect its resolution.

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

@dosubot[bot] commented on GitHub (Apr 8, 2025): <!-- Answer --> The error "Cannot find __base.provider.Provider" typically indicates an issue with the import or module resolution in your code. Here are a few steps to help resolve this issue in the context of Dify: 1. **Check Import Paths**: Ensure that the `Provider` class is correctly imported in your code. Verify that the import statement matches the actual path where the `Provider` class is defined. 2. **Module Structure**: Make sure that the module structure is correctly set up. The `Provider` class should be located in a module that is accessible from where you are trying to use it. You might need to adjust the import statement to reflect the correct path. 3. **Verify Provider Class Location**: If you are unsure about the location of the `Provider` class, you might need to search through the codebase to find its exact definition and path. This will help you correct the import statement. 4. **Environment Configuration**: Ensure that your Python environment is correctly set up and that all necessary dependencies are installed. Sometimes, issues with the environment can lead to import errors. If these steps do not resolve the issue, you might want to check the Dify documentation or codebase for any specific configurations or settings related to the 'provider' module that might affect its resolution. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/5f65a90d-b1c7-4738-b630-c6e204dbcf57?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/5f65a90d-b1c7-4738-b630-c6e204dbcf57?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/5f65a90d-b1c7-4738-b630-c6e204dbcf57?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/5f65a90d-b1c7-4738-b630-c6e204dbcf57?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5f65a90d-b1c7-4738-b630-c6e204dbcf57?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/5f65a90d-b1c7-4738-b630-c6e204dbcf57?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5f65a90d-b1c7-4738-b630-c6e204dbcf57?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#177