You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run a query, it gives me an error:
'SQLExecutorComponent' object has no attribute 'set_event_manager'
Reproduction
Using the "SQL Query" component, enter in DB URL, and query.
Run the component
It provides the following error message:
'SQLExecutorComponent' object has no attribute 'set_event_manager'
Traceback (most recent call last):
File "/langflow1.1.0/venv1.1.0/lib/python3.10/site-packages/langflow/api/v1/chat.py", line 227, in _build_vertex
vertex_build_result = await graph.build_vertex(
File "/langflow1.1.0/venv1.1.0/lib/python3.10/site-packages/langflow/graph/graph/base.py", line 1419, in build_vertex
await vertex.build(
File "/langflow1.1.0/venv1.1.0/lib/python3.10/site-packages/langflow/graph/vertex/base.py", line 818, in build
await step(user_id=user_id, event_manager=event_manager, **kwargs)
File "/langflow1.1.0/venv1.1.0/lib/python3.10/site-packages/langflow/graph/vertex/base.py", line 493, in _build
self.custom_component.set_event_manager(event_manager)
AttributeError: 'SQLExecutorComponent' object has no attribute 'set_event_manager'
Expected behavior
Expected to return the queried results.
Who can help?
No response
Operating System
MacOS
Langflow Version
1.1
Python Version
3.10
Screenshot
No response
Flow File
No response
The text was updated successfully, but these errors were encountered:
The error you're encountering is due to the SQLExecutorComponent not having a set_event_manager method. This method is typically used to associate an EventManager instance with a component, allowing it to handle events like messages or logs [1].
To resolve this issue, you need to ensure that the SQLExecutorComponent class implements the set_event_manager method. This method should assign the provided EventManager instance to an attribute within the component, enabling it to utilize the event manager's functionality for event handling.
Here's a basic example of how you might implement this method in the SQLExecutorComponent class:
classSQLExecutorComponent(CustomComponent):
# existing attributes and methodsdefset_event_manager(self, event_manager):
self.event_manager=event_manager
By adding this method, the SQLExecutorComponent will be able to handle events as expected, and the error should be resolved.
Bug Description
When I try to run a query, it gives me an error:
'SQLExecutorComponent' object has no attribute 'set_event_manager'
Reproduction
'SQLExecutorComponent' object has no attribute 'set_event_manager'
Traceback (most recent call last):
File "/langflow1.1.0/venv1.1.0/lib/python3.10/site-packages/langflow/api/v1/chat.py", line 227, in _build_vertex
vertex_build_result = await graph.build_vertex(
File "/langflow1.1.0/venv1.1.0/lib/python3.10/site-packages/langflow/graph/graph/base.py", line 1419, in build_vertex
await vertex.build(
File "/langflow1.1.0/venv1.1.0/lib/python3.10/site-packages/langflow/graph/vertex/base.py", line 818, in build
await step(user_id=user_id, event_manager=event_manager, **kwargs)
File "/langflow1.1.0/venv1.1.0/lib/python3.10/site-packages/langflow/graph/vertex/base.py", line 493, in _build
self.custom_component.set_event_manager(event_manager)
AttributeError: 'SQLExecutorComponent' object has no attribute 'set_event_manager'
Expected behavior
Expected to return the queried results.
Who can help?
No response
Operating System
MacOS
Langflow Version
1.1
Python Version
3.10
Screenshot
No response
Flow File
No response
The text was updated successfully, but these errors were encountered: