Skip to content

ExeSQL get tuple index out of range Error #2700

Discussion options

You must be logged in to vote

I have confirmed that the problem is caused by the Peewee package, I updated the code in ragflow/agent/component
/exesql.py,
and after switching to pymysql and psycopg2 directly, it now works.
I've included the code below for your reference. It might not be perfect, but until a proper fix is in place, it can serve as a temporary workaround.

import re
import pandas as pd
import psycopg2
import pymysql
from abc import ABC
from agent.component.base import ComponentBase, ComponentParamBase

class ExeSQLParam(ComponentParamBase):
"""
Define the ExeSQL component parameters.
"""

def __init__(self):
    super().__init__()
    self.db_type = "mysql"  # 默認為 MySQL
    self.database = ""
    self.user…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by marcochang1028
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants