'alembic current' crashes with stack trace

31 views
Skip to first unread message

Rob Schottland

unread,
Mar 26, 2020, 1:53:17 PM3/26/20
to sqlalchemy-alembic
Suddenly, I can't get alembic (1.3.3?). alembic history does work, but my most recent migration crashes with an enormous stack-trace (as usual): here's my current pretty-simple migration script:

"""Citation datasource optional

Revision ID: f5a6e316ee8d
Revises: 2a181e783d96
Create Date: 2020-03-26 08:54:59.547135

"""

# revision identifiers, used by Alembic.
revision = 'f5a6e316ee8d'
down_revision = '2a181e783d96'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.alter_column('citation', 'id_datasource',
                    existing_Type=sa.INTEGER(),
                    nullable=True)
    pass


def downgrade():
    op.alter_column('citation', 'id_datasource',
                    existing_Type=sa.INTEGER(),
                    nullable=False)
    pass

Here's the last  stanza  of the stack trace:

 File "/home/rschottland/.local/share/virtualenvs/astorb_db-u7fxujye/lib/python3.7/site-packages/sqlalchemy/sql/base.py", line 289, in _validate_dialect_kwargs
    "named <dialectname>_<argument>, got '%s'" % k


TypeError: Additional arguments should be named <dialectname>_<argument>, got 'index'

The whole 69 line stack trace is attached.

This is the 30th migration for this database going back to 2015. Nothing like this has occurred before. Could my alembic package be corrupted? The previous (successful) igration was only 3 days ago.

Any thoughts on this would be appreciated.




alembic_stacktrace.txt

Mike Bayer

unread,
Mar 26, 2020, 2:31:34 PM3/26/20
to sqlalchem...@googlegroups.com
Somewhere in your model, likely inside of a Table() object, there is a keyword "index" being used which is invalid.   Look for that keyword and remove it.
--
You received this message because you are subscribed to the Google Groups "sqlalchemy-alembic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy-alem...@googlegroups.com.


Attachments:
  • alembic_stacktrace.txt

Reply all
Reply to author
Forward
0 new messages