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
In valid.py, the line: subjects = value if isinstance(value, list) else [value]
converts a single value to a single-element list in subjects, which ensures that subjects will always be a list. However, later on, value is treated as a dictionary rather than a list: uri_validator(value["id"])
And in another place, it is treated as a list subscripted with the integer 0: f"credential subject id {value[0]} must be URI"'
In this case, if value is not a list, a KeyError 0 error is raised.
Once subjects has been assigned and is known to be a list, using the subject makes more sense than continuing to use the value having an ambiguous type.
2023-09-10 03:31:33,181 aries_cloudagent.admin.server ERROR Handler error with exception: 0
=================
Traceback (most recent call last):
File "/aries_cloudagent/messaging/valid.py", line 753, in __call__
uri_validator(value["id"])
File "/usr/local/lib/python3.9/site-packages/marshmallow/validate.py", line 499, in __call__
raise ValidationError(self._format_error(value))
marshmallow.exceptions.ValidationError: Value 123-45-6789_Dating is not URI
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
File "/aries_cloudagent/messaging/valid.py", line 756, in __call__
f"credential subject id {value[0]} must be URI"
KeyError: 0
2023-09-10 03:31:33,183 aiohttp.server ERROR Error handling request
Traceback (most recent call last):
File "/aries_cloudagent/messaging/valid.py", line 753, in __call__
uri_validator(value["id"])
File "/usr/local/lib/python3.9/site-packages/marshmallow/validate.py", line 499, in __call__
raise ValidationError(self._format_error(value))
marshmallow.exceptions.ValidationError: Value 123-45-6789_Dating is not URI
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
File "/aries_cloudagent/messaging/valid.py", line 756, in __call__
f"credential subject id {value[0]} must be URI"
KeyError: 0
The text was updated successfully, but these errors were encountered:
In valid.py, the line:
subjects = value if isinstance(value, list) else [value]
converts a single
value
to a single-element list insubjects
, which ensures thatsubjects
will always be a list. However, later on,value
is treated as a dictionary rather than a list:uri_validator(value["id"])
And in another place, it is treated as a list subscripted with the integer 0:
f"credential subject id {value[0]} must be URI"'
In this case, if
value
is not a list, aKeyError 0
error is raised.Once
subjects
has been assigned and is known to be a list, using thesubject
makes more sense than continuing to use thevalue
having an ambiguous type.The text was updated successfully, but these errors were encountered: