amazon-kinesis-client-python icon indicating copy to clipboard operation
amazon-kinesis-client-python copied to clipboard

Received ValueError: year is out of range from kclpy consistently on process start

Open nomad010 opened this issue 6 years ago • 1 comments

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)

nomad010 avatar Jan 30 '19 11:01 nomad010

I've the same problem ValueError: year 51106 is out of range .. downgrading the kclpy dependency seems to work.

green2k avatar Feb 20 '19 16:02 green2k