skip to Main Content
    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)

I am getting this error in both cases while adding the dataframe to the postgre sql database

meta = MetaData(self.connectable, schema=schema)

TypeError: init() got multiple values for argument ‘schema’

2

Answers


  1. I just had this issue on Pandas 1.1.3 + SQLAlchemy 2.0.0. Updated to 1.5.3 and it was gone.

    Login or Signup to reply.
  2. The issue started just when my package got updated. It is working on these fixed versions.

    pandas==1.1.5
    SQLAlchemy==1.4.45

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search