I want to enable realtime configuration on asterisk server. In the 2021 with a Slackware current, all works fine, now with Slackware 15 and Debian 11 I fail.
I have installed the correct packages, configured and tested mariadb server, but when I try to populate the tables with alembic... On slackware-15.0 I get error about importing mysql python module (the package don't support python3 as web mainpage said).
On Debian 11 I get this error
alembic -c config.ini upgrade head
INFO [alembic.runtime.setup] Testing for an old alembic_version table.
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
/usr/lib/python3/dist-packages/alembic/script/revision.py:152: UserWarning: Revision 43956d550a44 referenced from 43956d550a44 -> 581a4264e537 (head), adding extensions is not present
util.warn(
Traceback (most recent call last):
File "/usr/bin/alembic", line 33, in <module>
sys.exit(load_entry_point('alembic==1.4.3.dev0', 'console_scripts', 'alembic')())
File "/usr/lib/python3/dist-packages/alembic/config.py", line 581, in main
CommandLine(prog=prog).main(argv=argv)
File "/usr/lib/python3/dist-packages/alembic/config.py", line 575, in main
self.run_cmd(cfg, options)
File "/usr/lib/python3/dist-packages/alembic/config.py", line 552, in run_cmd
fn(
File "/usr/lib/python3/dist-packages/alembic/command.py", line 298, in upgrade
script.run_env()
File "/usr/lib/python3/dist-packages/alembic/script/base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/lib/python3/dist-packages/alembic/util/pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "/usr/lib/python3/dist-packages/alembic/util/compat.py", line 184, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "config/env.py", line 152, in <module>
run_migrations_online()
File "config/env.py", line 93, in run_migrations_online
for x in script.iterate_revisions('head', 'base'):
File "/usr/lib/python3/dist-packages/alembic/script/revision.py", line 765, in _iterate_revisions
requested_lowers = self.get_revisions(lower)
File "/usr/lib/python3/dist-packages/alembic/script/revision.py", line 321, in get_revisions
resolved_id, branch_label = self._resolve_revision_number(id_)
File "/usr/lib/python3/dist-packages/alembic/script/revision.py", line 501, in _resolve_revision_number
self._revision_map
File "/usr/lib/python3/dist-packages/alembic/util/langhelpers.py", line 230, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "/usr/lib/python3/dist-packages/alembic/script/revision.py", line 156, in _revision_map
down_revision = map_[downrev]
KeyError: '43956d550a44'
any solution?
edit1: I have tested on opensuse 15.3 and all works fine, the packages related are
alembic
python2-alembic
python2-Mako
python2-SQLAlchemy
python2-mysql-connector-python
python2-mysqlclient
python2-python-dateutil
python2-python-editor