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

Problem use of flask alembic command when taxhub and citizen in same BDD #431

Open
andriacap opened this issue Dec 10, 2024 · 0 comments
Open

Comments

@andriacap
Copy link

What is the bug or the crash?

L'installation de GN Citizen avec TaxHub dans la même BDD semble poser problème pour l'utilisation des commandes flask alembic (erreur de partage de revisions alembic ?)

Steps to reproduce the issue

Installer citizen avec taxhub dans la même BDD
Source virtual environnement python .
Allez dans le backend de citizen.
Et lancer la commande flask db status

Versions

1.1.0

Additional context

Réponse à la commande flask db status
Traceback (most recent call last):
  File "/home/geonatureadmin/citizen/backend/.venv/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/flask/cli.py", line 1064, in main
    cli.main()
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/flask/cli.py", line 358, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/utils_flask_sqla/commands.py", line 128, in status
    applied_rev = set(script.iterate_revisions(current_heads, "base"))
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/alembic/script/revision.py", line 813, in iterate_revisions
    revisions, heads = fn(
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/alembic/script/revision.py", line 1438, in _collect_upgrade_revisions
    for rev in self._parse_upgrade_target(
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/alembic/script/revision.py", line 1229, in _parse_upgrade_target
    return self.get_revisions(target)
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/alembic/script/revision.py", line 543, in get_revisions
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/alembic/script/revision.py", line 543, in <listcomp>
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/alembic/script/revision.py", line 566, in get_revisions
    return tuple(
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/alembic/script/revision.py", line 567, in <genexpr>
    self._revision_for_ident(rev_id, branch_label)
  File "/home/geonatureadmin/citizen/backend/.venv/lib/python3.9/site-packages/alembic/script/revision.py", line 638, in _revision_for_ident
    raise ResolutionError(
alembic.script.revision.ResolutionError: No such revision or branch '1f7b958108ed'
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

1 participant