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

Custom component not showing in the UI #5753

Open
mgsotelo opened this issue Jan 17, 2025 · 1 comment
Open

Custom component not showing in the UI #5753

mgsotelo opened this issue Jan 17, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@mgsotelo
Copy link

Bug Description

I am using a Langflow custom component but I can't see it in the UI. My .env is the following:

LANGFLOW_LOG_LEVEL=debug
LANGFLOW_LOG_FILE='logs/langflow.log'
LANGFLOW_COMPONENTS_PATH='./components/'

My file structure is the following:

├── components
│   └── financial
│       └── polygon_stock_graph.py
└── logs
    ├── langflow.2025-01-15_15-46-14_723977.log
    └── langflow.log

4 directories, 3 files

But still I can't see my component in the UI, I saw this issue (5595) without success, solved by this PR but it doesn't solve my issue. Any ideas?

So far, the only workaround I found is to create a Custom Component from the UI and copy/paste my python code there, but I don't think that it is an ideal scenario.

Reproduction

  1. Install Langflow version 1.1.1 and set up the application.
  2. Open the Langflow UI.
  3. Navigate to the Helpers menu.
  4. Observe that the Custom Component option is not available.

Expected behavior

The Helpers menu should include the Custom Component option, allowing users to drag it into the workspace and define custom components as described in the Langflow documentation.

Who can help?

@italojohnny, @ogabrielluiz or anyone on the Full Stack team

Operating System

macOS Sonoma Version 14.2.1 (23C71)

Langflow Version

1.1.1

Python Version

3.11

Screenshot

The component is not showing in the UI, and not even its category is shown

Image

Flow File

N/A

@mgsotelo mgsotelo added the bug Something isn't working label Jan 17, 2025
Copy link

dosubot bot commented Jan 17, 2025

@mgsotelo Hello! I'm here to help you with any bugs, questions, or becoming a contributor. Let's tackle this issue together!

To resolve the issue of your custom component not appearing in the Langflow UI, ensure the following:

  1. Directory Structure: Your directory structure seems correct, as the component is placed inside a category folder (financial). This should make it appear under a "Financial" menu in the UI.

  2. Component Class Definition: Verify that your polygon_stock_graph.py file contains a Python class that extends the CustomComponent class and includes a build method. This is necessary for Langflow to recognize it as a valid component [1].

  3. Environment Variable: Ensure that the LANGFLOW_COMPONENTS_PATH is correctly set and points to the directory containing your components. It seems correctly set in your .env file, but double-check that the path is resolved correctly when Langflow runs.

  4. Logs: Since you have logging enabled, check the langflow.log file for any error messages or warnings related to loading your custom component. This might provide insights into what might be going wrong.

  5. Langflow Version: You mentioned using version 1.1.1. Ensure that any known issues with this version, such as the one you referenced, are not affecting your setup. The issue you mentioned was resolved in a PR, so make sure your version includes this fix.

If all these are correctly set and the issue persists, consider testing with a minimal example component to rule out any specific issues with your current component code.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

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

1 participant