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
{{ message }}
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
[ERROR] TypeError: list indices must be integers or slices, not str
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 60, in lambda_handler
payloads.append(ProcessPayload(payload, update=True))
File "/var/task/cirrus/lib/process_payload.py", line 59, in __init__
self.update()
File "/var/task/cirrus/lib/process_payload.py", line 155, in update
self['id'] = f"{collections_str}/workflow-{self.process['workflow']}/{items_str}"
The text was updated successfully, but these errors were encountered:
It should be pretty easy to pop the id off of the test payload for one of the workflow chaining tests to duplicate this issue and facilitate debugging.
The error here was caused by an invalid input payload that had an array of process definitions in the first index of the process array. While this could be considered user error with no required changes, I do think having a more descriptive errors would be helpful in two main cases:
in this case we should have a specific error message stating that branching is not supported in the first step of a workflow chain
in the general case of an invalid payload we should try to have an invalid payload exception (probably using the from keyword to show the specific exception text.
I don't think we can necessarily enforce the latter throughout all the code, but it could be useful in the class constructor in particular.
If no
id
is specified in the input payload, then we run https://github.com/cirrus-geo/cirrus-lib/blob/main/src/cirrus/lib/process_payload.py#L154. However, if we are also using aprocess
array for workflow chaining, the line assigning theid
fails with the following traceback:The text was updated successfully, but these errors were encountered: