Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLAlchemy version heck causing runner startup failure? #7

Open
dkegel-fastly opened this issue Feb 19, 2024 · 1 comment
Open

SQLAlchemy version heck causing runner startup failure? #7

dkegel-fastly opened this issue Feb 19, 2024 · 1 comment

Comments

@dkegel-fastly
Copy link

Symptom:

$ python3 runner.py 
...
  DEBUG    | All tests have been successfully completed.
Traceback (most recent call last):
  File "runner.py", line 158, in <module>
    main()
  File "runner.py", line 151, in main
    check_engine_connection()
  File "runner.py", line 22, in check_engine_connection
    _ = pd.read_sql_query("SELECT 1", engine)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/io/sql.py", line 435, in read_sql_query
    pandas_sql = pandasSQL_builder(con)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/io/sql.py", line 788, in pandasSQL_builder
    return SQLDatabase(con, schema=schema, meta=meta)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/io/sql.py", line 1410, in __init__
    meta = MetaData(self.connectable, schema=schema)
TypeError: __init__() got multiple values for argument 'schema'

Workaround:

$ python3 -m pip install sqlalchemy==1.4.46

h/t https://stackoverflow.com/questions/75282511/df-to-table-throw-error-typeerror-init-got-multiple-values-for-argument

Perhaps the reqirements.txt could be more specific about sqlalchemy major version...?

@jackneer
Copy link

@Boris-Rozenfeld I'd add the version number to requirements.txt or you are looking for other approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants