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

mypy error: Argument 1 to "fileConfig" has incompatible type "Optional[str]" #986

Closed
scratchmex opened this issue Feb 7, 2022 · 2 comments
Labels
bug Something isn't working migration environment

Comments

@scratchmex
Copy link

Describe the bug

start with alembic init migrations and you will get the error. Basically fileConfig expects an str not None. By default when alembic is called via the cli the parameter is filled with alembic.ini but in the class definition of Config by default is None

Expected behavior

To Reproduce
Please try to provide a Minimal, Complete, and Verifiable example, with the migration script and/or the SQLAlchemy tables or models involved.
See also Reporting Bugs on the website.

# Insert code here

Error

# Copy error here. Please include the full stack trace.

Versions.

  • OS:
  • Python:
  • Alembic: alembic 1.7.6
  • SQLAlchemy:
  • Database:
  • DBAPI:

Additional context

Have a nice day!

@scratchmex scratchmex added the requires triage New issue that requires categorization label Feb 7, 2022
@sqla-tester
Copy link
Collaborator

Mike Bayer has proposed a fix for this issue in the main branch:

add conditional for fileConfig() https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/3578

@zzzeek zzzeek added bug Something isn't working migration environment and removed requires triage New issue that requires categorization labels Feb 7, 2022
@zzzeek
Copy link
Member

zzzeek commented Feb 7, 2022

sure thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working migration environment
Projects
None yet
Development

No branches or pull requests

3 participants