Score:0

Ubuntu 20 python: "OverflowError: mktime argument out of range"

at flag

Enviroment

OS version: Ubuntu 20.04.2 LTS

python version: python3.8.5/python3.7.1

pendulum: 1.4.4

Details

I am using airlfow1.10.12. And I find the boom like this OverflowError: mktime argument out of range when I explore the landing times.

enter image description here

I look into it and find that it may be an OS issue. I test python3.8.5 and python3.7.1 in Ubuntu16.04, and it is all right. But in Ubuntu20.04.2, both python3.8.5 and python3.7.1 get the error.

In Ubuntu20.04.2, When I upgrade pendulum to 2.0.0 or greater, I will work. But airflow1.10.12 requires pendulum==1.4.4 and it can not start with pendlum==2.0.

How to reproduce it:

pip install pendulum==1.4.4
import pendulum
from datetime import datetime, timedelta, timezone
import time

dt = datetime(2022, 1, 24, 0, 10)
a=pendulum.tz.timezone('Asia/Singapore')
time2 = dt.replace(tzinfo=a)
time2.timetuple()
time.mktime(time2.timetuple())
Mapleaves avatar
at flag
When I upgrade pendulum to 2.0.0 or greater, I will work. But airflow1.10.12 requires pendulum==1.4.4 and it can not start with pendlum==2.0.0
David avatar
cn flag
Best to add that info to the question via edit rather then as a comment.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.