Hey Ning,

Thanks for the answer. Shouldn't the start and end be timestamps? If I set
them to ints manually what is now for start? I assume max int would be end
if I never want it to end?

On Mon, 21 Dec 2020 at 18:45, Ning Kang <ni...@google.com> wrote:

> I also ran into this issue some time ago. Couldn't figure out why, but
> explicitly setting the end and start to some integer value when building
> the `PeriodicImpulse` transform could be a workaround.
>
> On Mon, Dec 21, 2020 at 4:19 AM Manninger, Matyas <
> matyas.mannin...@veolia.com> wrote:
>
>> Dear Beam users,
>>
>> In the python SDK I tried using the PeriodicImpulse but seems like there
>> is an internal bug. In the periodicsequence.py on line 42 there is a
>> division where a type Duration is being divided, but no division operation
>> is defined. What am I missing? Is there a workaround to this? Here is the
>> error message that lead to this "discovery":
>> File
>> "/home/user/.virtualenvs/dflowenv/lib/python3.8/site-packages/apache_beam/transforms/periodicsequence.py",
>> line 42, in initial_restriction
>>    total_outputs = math.ceil((end - start) / interval)
>> TypeError: unsupported operand type(s) for /: 'Duration' and 'Duration'
>> [while running 'read/periodic_impulse/GenSequence/PairWithRestriction']
>>
>>

Reply via email to