Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when set custom component in V0.6.5,it is work。 but when start v1.0.0,it is not have custom menu。 #2330

Open
junbin1011 opened this issue Jun 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@junbin1011
Copy link

when set custom component in V0.6.5,it is work。 but when start v1.0.0,it is not have custom menu, and I can not find my custom component.
image
image

@dosubot dosubot bot added the bug Something isn't working label Jun 25, 2024
Copy link

dosubot bot commented Jun 25, 2024

@junbin1011 你好!我是Dosu,一个可以帮助你解决bug、回答问题并成为贡献者的机器人。我会在等待人类维护者的过程中帮助你。

To resolve the issue of your custom component not appearing in the custom menu after upgrading from version 0.6.5 to version 1.0.0 of the LangFlow application, ensure that your __init__.py file in the custom_component directory is correctly importing and exposing the necessary components. Your __init__.py file should look like this:

from langflow.interface.custom.base import CustomComponentCreator
from langflow.interface.custom.custom_component import CustomComponent

__all__ = ["CustomComponentCreator", "CustomComponent"]

Make sure there are no duplicate lines and that both CustomComponentCreator and CustomComponent are correctly defined and imported. This should help in making the custom component appear in the custom menu. Additionally, ensure that there are no redundant imports or definitions to avoid conflicts [1][2][3][4].

Also, verify that the LANGFLOW_COMPONENTS_PATH environment variable is correctly set to the path of your custom components directory. This can be done in your Dockerfile as shown:

ENV LANGFLOW_COMPONENTS_PATH='["/app/custom_components"]'

If the issue persists, check for any errors in the console logs when LangFlow starts. LangFlow will print an error message to the console if a component fails to load due to errors in the component's code [5][6][7].

To continue talking to Dosu, mention @dosu.

@czHero
Copy link

czHero commented Jun 27, 2024

same problem。versions:1.0.5

@czHero
Copy link

czHero commented Jun 27, 2024

same problem。versions:1.0.5

the dir shoul like this:

├── custom_components
│   ├── init.py
│   ├── custom
│   │   ├── init.py
│   │   └── router1.py
│   └── router2.py
router1.py can be load, but router2.py can not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants