awslabs / awslabs/amazon-kinesis-client-python
Received ValueError: year is out of range from kclpy consistently on process start
- Dominant language
- Python
- Stars
- 377
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
When starting up the process we receive an that error says:
```
self._approximate_arrival_timestamp = datetime.fromtimestamp(self._timestamp_millis / 1000.0)
Received error line from subprocess [ValueError: year is out of range] for shard shardId-000000000000
ValueError: year is out of range
```
From our experimentation it seems that `self._timestamp_millis` is in the 1e15 range (as in a microsecond value is being sent through and not a millisecond value).
We put a hacky solution to in our environment to workaround the problem temporarily:
```
if self._timestamp_millis >= 1e13:
self._timestamp_millis = self._timestamp_millis / 1000.0
self._approximate_arrival_timestamp = datetime.fromtimestamp(self._timestamp_millis / 1000.0)
```
This fixed the issue from occurring but obviously it's not a permanent solution. We downgraded to the version of this library we were previously using and that worked fine as well.
The problem is presenting on `amazon_kclpy==2.0.0` and we are using OpenJDK1.8
```
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-1~bpo8+1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
```
Contributor guide
Assessment
This issue has not been assessed yet.