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

Compatibility issue between aerich and pydantic #359

Open
Anihouvi opened this issue Sep 30, 2024 · 0 comments
Open

Compatibility issue between aerich and pydantic #359

Anihouvi opened this issue Sep 30, 2024 · 0 comments

Comments

@Anihouvi
Copy link

aerich inspectdb
Traceback (most recent call last):
File "/venv/bin/aerich", line 8, in
sys.exit(main())
^^^^^^
File "/venv/lib/python3.12/site-packages/aerich/cli.py", line 265, in main
cli()
File "/venv/lib/python3.12/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.12/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.12/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.12/site-packages/aerich/cli.py", line 31, in wrapper
loop.run_until_complete(f(*args, **kwargs))
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 664, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "venv/lib/python3.12/site-packages/aerich/cli.py", line 260, in inspectdb
ret = await command.inspectdb(table)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "venv/lib/python3.12/site-packages/aerich/init.py", line 124, in inspectdb
return await inspect.inspect()
^^^^^^^^^^^^^^^^^^^^^^^
File "venv/lib/python3.12/site-packages/aerich/inspectdb/init.py", line 95, in inspect
columns = await self.get_columns(table)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "site-packages/aerich/inspectdb/postgres.py", line 62, in get_columns
Column(
File "/venv/lib/python3.12/site-packages/pydantic/main.py", line 212, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for Column
extra
Field required [type=missing, input_value={'name': 'id', 'data_type...: False, 'index': False}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.9/v/missing

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