Hi , which packages do you use when you have issue __init__() got multiple values for argument 'schema'. how can i solve this issue. Which packages will i use? Thanks
You need to provide more information. __init__() for what class in what package? Posting code would be great so we can see the imports. Also post the error message with the entire error trace.
The only way I can think of to make this happen is to provide a value as a positional argument and as a named argument. Like this:
class Something:
def __init__(arg1, arg2=0):
"""Has a positional and a named argument"""
x = Something(1, 2, arg2=2)
Error:
x = Something(1, 2, arg2=3)
TypeError: Something.__init__() got multiple values for argument 'arg2'
arg2 is passed the value 2 as a positional argument and 3 as a named argument. I would get a similar error doing this:
x = Something(1, arg1=2)
This is the code
# Import sqlalchemy's create_engine() function
from sqlalchemy import create_engine
import pandas as pd
# Create the database engine
engine = create_engine("oracle+cx_oracle://dw1:dw2@local")
# Create a SQL query to load the entire table
query = """
select*from tab t where trunc(t.date)>'15.12.2023'
"""
# Load with the SQL query
load = pd.read_sql(query,engine)
(Jan-03-2024, 08:34 AM)dawid294 Wrote: [ -> ]This is the code
And the full traceback is...?
Please don't provide one piece of info at a time.
Anyway, I would guess the problem is oracle+cx_oracle
part and the question is why that
Try upgrading pandas. Check
https://stackoverflow.com/q/75282511/4046632