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

get_body_field() got an unexpected keyword argument 'dependant' #1286

Closed
zromick opened this issue Sep 16, 2024 · 1 comment
Closed

get_body_field() got an unexpected keyword argument 'dependant' #1286

zromick opened this issue Sep 16, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@zromick
Copy link

zromick commented Sep 16, 2024

Not certain what's happening, but upgrading to pytest 8.3.3 from pytest 8.2.2 leads to this error, perhaps because of sub dependencies? Feel free to close the issue if there's no good way to investigate this.

INFO sqlalchemy.engine.Engine BEGIN (implicit)
INFO sqlalchemy.engine.Engine PRAGMA main.table_info("execution")
INFO sqlalchemy.engine.Engine [raw sql] ()
INFO sqlalchemy.engine.Engine COMMIT
ImportError while loading conftest 'conftest.py'.
conftest.py:7: in <module>
    from main import app
main.py:33: in <module>
    app = get_application(settings)
main.py:23: in get_application
    add_pagination(application)
lib/python3.11/site-packages/fastapi_pagination/api.py:390: in add_pagination
    _add_pagination(parent)
lib/python3.11/site-packages/fastapi_pagination/api.py:380: in _add_pagination
    _update_route(route)
lib/python3.11/site-packages/fastapi_pagination/api.py:364: in _update_route
    route.body_field = get_body_field(dependant=route.dependant, name=route.unique_id)
E   TypeError: get_body_field() got an unexpected keyword argument 'dependant'
@uriyyo uriyyo self-assigned this Sep 16, 2024
@uriyyo uriyyo added the bug Something isn't working label Sep 16, 2024
@uriyyo
Copy link
Owner

uriyyo commented Sep 16, 2024

Hi,

It's related to this issue #1273

You need to update fastapi-pagination version to latest one

@zromick zromick closed this as completed Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants