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
This is essentially the same issue as #125; it appears maybe this feature is now broken?
I, like #125, am attempting to validate an aiohttp request query arguments, which isn't a dict, but is a Mapping.
However, voluptuous requires a dict, as can be seen here; I see this in my stack trace:
Traceback (most recent call last):
File "…/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 221, in __call__
return self._compiled([], data)
File "…/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 504, in validate_dict
raise er.DictInvalid('expected a dictionary', path)
voluptuous.error.DictInvalid: expected a dictionary
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "…/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in start
resp = yield from self._request_handler(request)
File "…/lib/python3.6/site-packages/aiohttp/web.py", line 306, in _handle
resp = yield from handler(request)
File "…/__main__.py", line 32, in wrapper
json_data = await func(*args, **kwargs)
File "…/__main__.py", line 88, in foo
validated_qargs = _SCHEMA(request.query)
File "…/lib/python3.6/site-packages/voluptuous/schema_builder.py", line 225, in __call__
raise er.MultipleInvalid([e])
voluptuous.error.MultipleInvalid: expected a dictionary
I think it's as simple as changing that dict to Mapping?
The text was updated successfully, but these errors were encountered:
This is essentially the same issue as #125; it appears maybe this feature is now broken?
I, like #125, am attempting to validate an aiohttp request query arguments, which isn't a
dict
, but is aMapping
.However,
voluptuous
requires adict
, as can be seen here; I see this in my stack trace:I think it's as simple as changing that
dict
toMapping
?The text was updated successfully, but these errors were encountered: