s3cmd icon indicating copy to clipboard operation
s3cmd copied to clipboard

NameError: global name 'formatDateTime' is not defined

Open GuaGuaTai opened this issue 3 years ago • 1 comments

Invoked as: /usr/bin/s3cmd ls Problem: NameError: global name 'formatDateTime' is not defined S3cmd: 2.2.0 python: 2.6.6 (r266:84292, May 1 2012, 13:52:17) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] environment LANG=zh_CN.GB18030

Traceback (most recent call last): File "/usr/bin/s3cmd", line 3121, in rc = main() File "/usr/bin/s3cmd", line 3030, in main rc = cmd_func(args) File "/usr/bin/s3cmd", line 156, in cmd_ls subcmd_all_buckets_list(s3) File "/usr/bin/s3cmd", line 164, in subcmd_all_buckets_list output(u"%s s3://%s" % (formatDateTime(bucket["CreationDate"]), NameError: global name 'formatDateTime' is not defined

GuaGuaTai avatar Jul 01 '22 09:07 GuaGuaTai

Hi, this error does not make sense to me, but you are using a very very old version of python that is unsupported (2.6). Can you update to python 2.7 at least? Otherwise, you could try to complete uninstall and reinstall s3cmd, or try to install the master version here.

fviard avatar Jul 02 '22 10:07 fviard

Closing as no update, please don't hesitate to reopen if you are still encountering the issue and can get more details.

fviard avatar Aug 28 '22 00:08 fviard