awslabs / awslabs/amazon-kinesis-client-python

AttributeError: 'CheckpointInput' object has no attribute 'action'

Open
#339 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
377
Forks
228
PR merge metrics
No merged PRs in 30d

Description

I have a error:

```python
Traceback (most recent call last):
File "script.py", line 290, in
kcl_process.run()
~~~~~~~~~~~~~~~^^
File "python3.14/site-packages/amazon_kclpy/kcl.py", line 296, in run
self._handle_a_line(line)
~~~~~~~~~~~~~~~~~~~^^^^^^
File "python3.14/site-packages/amazon_kclpy/kcl.py", line 275, in _handle_a_line
self._report_done(action.action)
^^^^^^^^^^^^^
AttributeError: 'CheckpointInput' object has no attribute 'action'
```

If we will see to `kcl.py` we will find a code like:

```python
def _handle_a_line(self, line):
...
action = self.io_handler.load_action(line)
self._perform_action(action)
self._report_done(action.action)
```

Where `action` is `amazon_kclpy.messages.CheckpointInput` object.

If we go to `amazon_kclpy/messages.py`, we will find that

```python
class CheckpointInput(object):
...
def __init__(self, json_dict):
...
self._sequence_number = json_dict["sequenceNumber"]
self._sub_sequence_number = json_dict["subSequenceNumber"]
self._error = json_dict.get("error", None)

@property
def sequence_number(self):
...

@property
def sub_sequence_number(self):
...

@property
def error(self):
...
```

here is really no `action` property.

Sounds like it should be fixed

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.