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

Error building "SQL Executor" component #4127

Closed
SavvySupport opened this issue Oct 14, 2024 · 6 comments
Closed

Error building "SQL Executor" component #4127

SavvySupport opened this issue Oct 14, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@SavvySupport
Copy link

Bug Description

We were using V1.0.16. The SQL Executor component was working fine.

We upgraded to version V1.0.19. Since then, we've had issues with the "SQL Executor" component.

When we click on the "play" button on the SQL Executor component, it says:

'SQLExecutorComponent' object has no attribute 'set_event_manager'

The component output shows the following:
Traceback (most recent call last):
File "/langflow/venv/lib/python3.10/site-packages/langflow/api/v1/chat.py", line 219, in _build_vertex
vertex_build_result = await graph.build_vertex(
File "/langflow/venv/lib/python3.10/site-packages/langflow/graph/graph/base.py", line 1384, in build_vertex
await vertex.build(
File "/langflow/venv/lib/python3.10/site-packages/langflow/graph/vertex/base.py", line 832, in build
await step(user_id=user_id, event_manager=event_manager, **kwargs)
File "/langflow/venv/lib/python3.10/site-packages/langflow/graph/vertex/base.py", line 498, in _build
self._custom_component.set_event_manager(event_manager)
AttributeError: 'SQLExecutorComponent' object has no attribute 'set_event_manager'

Reproduction

  1. Enter in fields for the SQL Executor component (Database URL, query)
  2. Click on the "play" button to run the component

Expected behavior

It would run the query with no error messages previously on V1.0.16. The standard "tick" would show on the component to show it running properly.

Who can help?

No response

Operating System

macOS Ventura 13.5.1

Langflow Version

V1.0.19

Python Version

3.10

Screenshot

https://prnt.sc/eInlqX0wlqqF, https://prnt.sc/wKBejoiFS4-h

Flow File

No response

@SavvySupport SavvySupport added the bug Something isn't working label Oct 14, 2024
Copy link

dosubot bot commented Oct 14, 2024

The AttributeError you're encountering with the SQLExecutorComponent in version V1.0.19 is due to the absence of the set_event_manager method, which was likely present in version V1.0.16. This method is used to assign an EventManager instance to the component for handling events [1].

To resolve this issue, you can:

  1. Check for Updates: Look for any updates or patches that might address this issue in the latest version.
  2. Modify Code: If you have access to the code, you could add a placeholder set_event_manager method to the SQLExecutorComponent to bypass the error temporarily.
  3. Revert to V1.0.16: If the above options are not feasible, consider reverting to version V1.0.16 where the component was functioning correctly.

These steps should help you address the error until a more permanent fix is available.

To continue talking to Dosu, mention @dosu.

@tonnyESP
Copy link

👋 Same issue here!

I've tried updating the component code, following the guidelines. No errors are returned, but I still get the message: "Please build the component first" when I "play" the node.

@Gluepower
Copy link

I have this issue with every custom component I have build.
image

@joaoguilhermeS
Copy link
Collaborator

Hi @SavvySupport, @tonnyESP, @Gluepower,

Thank you all for your support. This issue will be resolved in the upcoming v1.19.1 release.

It is a duplicate of Issue #4223 and has been addressed in PR #4230.

@SavvySupport
Copy link
Author

Resolved in v1.19.1, or v1.19.post1?

https://github.com/langflow-ai/langflow/releases

@dn-scribe
Copy link

I have the same problem on v.1.1.1
After modifying the component I get
"first buid the component"

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

5 participants