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

Error reported when add and modify many to many relationships #351

Open
zy1000 opened this issue Jul 11, 2024 · 1 comment
Open

Error reported when add and modify many to many relationships #351

zy1000 opened this issue Jul 11, 2024 · 1 comment

Comments

@zy1000
Copy link

zy1000 commented Jul 11, 2024

Traceback (most recent call last):
File "/venv/bin/aerich", line 8, in
sys.exit(main())
^^^^^^
File "/venv/lib/python3.11/site-packages/aerich/cli.py", line 265, in main
cli()
File "/venv/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/aerich/cli.py", line 31, in wrapper
loop.run_until_complete(f(*args, **kwargs))
File "/usr/local/python3.11/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/aerich/cli.py", line 86, in migrate
ret = await command.migrate(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/aerich/init.py", line 127, in migrate
return await Migrate.migrate(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/aerich/migrate.py", line 140, in migrate
cls.diff_models(cls._last_version_content, new_version_content)
File "/venv/lib/python3.11/site-packages/aerich/migrate.py", line 244, in diff_models
table = change[0][1].get("through")
^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'get'

I have seen someone raise this issue since 2021. Is there a solution now
My aerial version is 0.7.2

@2849232wy
Copy link

i have similar the problem

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

2 participants