LoginSignup
0
0

Kaggle コマンドの locale バグ

Posted at
$ kaggle competitions download -c blood-vessel-segmentation
time data 'Fri, 03 Nov 2023 22:06:42 GMT' does not match format '%a, %d %b %Y %H:%M:%S %Z'
$ kaggle -v
Kaggle API 1.5.16

手っ取り早く

export LC_ALL=C

でエラーを回避できた。

これは locale 依存な %a で英語 Fri を datetime.strptime しようとしているために locale が英語以外だとエラーになる。私は ja_JP になっていた:

$ python3
>>> import locale
>>> locale.getlocale(locale.LC_TIME)
('ja_JP', 'UTF-8')

Ubuntu 22.04 LTS & Python 3.11.5

私が一度バグ報告したけど、その時は python locale が英語以外になりうるのかわからなかったので、en_USに対処できただけで引き上げた。他に困っている人があまりいなそうなのでここにひっそりと記録を残す。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0