获得参数“schema”的多个值

sin*_*maz 10 python postgresql sqlalchemy dataframe

    self.engine=create_engine("postgresql://postgres:12345@localhost/postgres")
            self.con = self.engine.connect()
            self.conn.autocommit = True
            self.cursor = self.conn.cursor()

     
df.to_sql(symbol, schema='xxx', con=self.con, if_exists='append',
                      index=False)


    df.to_sql(symbol, con=self.con, if_exists='append',
                      index=False)
Run Code Online (Sandbox Code Playgroud)

在将数据帧添加到 postgre sql 数据库时,我在这两种情况下都收到此错误

meta = MetaData(self.connectable, schema=schema)
Run Code Online (Sandbox Code Playgroud)

类型错误:init () 获得了参数“schema”的多个值

rec*_*con 6

我刚刚在 Pandas 1.1.3 + SQLAlchemy 2.0.0 上遇到了这个问题。更新到1.5.3就没有了。


小智 5

当我的软件包更新时,问题就开始了。它正在研究这些固定版本。

pandas==1.1.5 SQLAlchemy==1.4.45