Skip to content

Can't serialize graphs using Retry #115

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

Closed
fitzoh opened this issue Jan 19, 2021 · 1 comment · Fixed by #169
Closed

Can't serialize graphs using Retry #115

fitzoh opened this issue Jan 19, 2021 · 1 comment · Fixed by #169
Labels
bug Something isn't working
Milestone

Comments

@fitzoh
Copy link

fitzoh commented Jan 19, 2021

Just installed v1.1.2

from stepfunctions.steps import Graph, Task, states, Retry
retry = Retry(error_equals=["States.TaskFailed"])
Task(state_id="whatever", retry=retry).to_json()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/fitz/Workspace/github.com/mobikitinc/data-ingest/venv/lib/python3.8/site-packages/stepfunctions/steps/states.py", line 93, in to_json
    return json.dumps(self.to_dict())
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type Retry is not JSON serializable

@ca-nguyen
Copy link
Contributor

A fix was merged in #169

This will be included in the next release

@ca-nguyen ca-nguyen reopened this Oct 7, 2021
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
3 participants