You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<ContextVar name='ROUTE_CONTEXT_VAR' at 0xffff945f79c0>
Traceback (most recent call last):
File "/opt/venv/lib/python3.11/site-packages/ninja/operation.py", line 132, in run
values = self._get_values(request, kw, temporal_response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/ninja/operation.py", line 309, in _get_values
data = model.resolve(request, self.api, path_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/ninja/params/models.py", line 68, in resolve
return cls.model_validate(data, context={"request": request})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/pydantic/main.py", line 703, in model_validate
return cls.__pydantic_validator__.validate_python(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/ninja/schema.py", line 225, in _run_root_validator
handler(values)
File "/opt/venv/lib/python3.11/site-packages/ninja_jwt/schema.py", line 131, in validate_inputs
request = schema_input.get_request()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/ninja_jwt/schema.py", line 37, in get_request
return service_resolver(RouteContext).request
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/ninja_extra/dependency_resolver.py", line 38, in service_resolver
return injector.get(interfaces[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/injector/__init__.py", line 977, in get
result = provider_instance.get(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/injector/__init__.py", line 302, in get
return injector.call_with_injection(self._callable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/injector/__init__.py", line 1050, in call_with_injection
return callable(*full_args, **dependencies)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/ninja_extra/modules.py", line 31, in <lambda>
binder.bind(RouteContext, to=lambda: self.get_route_context()) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/venv/lib/python3.11/site-packages/ninja_extra/modules.py", line 27, in get_route_context
return ROUTE_CONTEXT_VAR.get()
^^^^^^^^^^^^^^^^^^^^^^^
LookupError: <ContextVar name='ROUTE_CONTEXT_VAR' at 0xffff945f79c0>
We got this error on the latest Version, when we switch back to 5.3.5 the error is not shown any more.
Below is the endpoint definition.
@vlada1g check if you are using the regular django ninja Router or NinjaAPI and if so, replace them with the django ninja extra equivalents. I remember I was doing this a couple of days ago and got the same error
We got this error on the latest Version, when we switch back to 5.3.5 the error is not shown any more.
Below is the endpoint definition.
The text was updated successfully, but these errors were encountered: