Skip to content

Calls to alembic still reference legacy version #199

@david-pettifor-nd

Description

@david-pettifor-nd

The current version of alembic has removed the direct migration class call, so new installations of this utility will fail to run unless a legacy version of alembic is specified during the pip installation.

See traceback:

Traceback (most recent call last):
  File "/usr/local/bin/commcare-export", line 8, in <module>
    sys.exit(entry_point())
  File "/usr/local/lib/python3.8/site-packages/commcare_export/cli.py", line 361, in entry_point
    main(sys.argv[1:])
  File "/usr/local/lib/python3.8/site-packages/commcare_export/cli.py", line 143, in main
    exit(main_with_args(args))
  File "/usr/local/lib/python3.8/site-packages/commcare_export/cli.py", line 352, in main_with_args
    exit_status = evaluate_query(env, query)
  File "/usr/local/lib/python3.8/site-packages/commcare_export/cli.py", line 271, in evaluate_query
    lazy_result = query.eval(env)
  File "/usr/local/lib/python3.8/site-packages/commcare_export/minilinq.py", line 144, in eval
    return self.body.eval(env.bind(self.name, self.value.eval(env)))
  File "/usr/local/lib/python3.8/site-packages/commcare_export/minilinq.py", line 434, in eval
    env.emit_table(TableSpec(
  File "/usr/local/lib/python3.8/site-packages/commcare_export/env.py", line 133, in emit_table
    except CannotEmit: return self.right.emit_table(table_spec)
  File "/usr/local/lib/python3.8/site-packages/commcare_export/env.py", line 556, in emit_table
    self.writer.write_table(table_spec)
  File "/usr/local/lib/python3.8/site-packages/commcare_export/writers.py", line 536, in write_table
    self.make_table_compatible(table_name, row_dict, data_type_dict)
  File "/usr/local/lib/python3.8/site-packages/commcare_export/writers.py", line 456, in make_table_compatible
    ctx = alembic.migration.MigrationContext.configure(self.connection)
AttributeError: module 'alembic' has no attribute 'migration'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions