我刚刚在 OS X 上安装了 gsutil,完全按照 Google 的说明进行操作,并且在运行任何 gsutil 命令时看到以下格式的错误:
Traceback (most recent call last):
File "/Users//gsutil/gsutil", line 22, in <module>
gsutil.RunMain()
File "/Users//gsutil/gsutil.py", line 101, in RunMain
sys.exit(gslib.__main__.main())
File "/Users//gsutil/gslib/__main__.py", line 175, in main
command_runner = CommandRunner()
File "/Users//gsutil/gslib/command_runner.py", line 107, in __init__
self.command_map = self._LoadCommandMap()
File "/Users//gsutil/gslib/command_runner.py", line 113, in _LoadCommandMap
__import__('gslib.commands.%s' % module_name)
File "/Users//gsutil/gslib/commands/disablelogging.py", line 16, in <module>
from gslib.command import COMMAND_NAME
ImportError: cannot import name COMMAND_NAME
此错误发生在命令目录中的几个模块上。为了摆脱这些错误,我唯一能做的就是从引用 COMMAND_NAME 的目录中删除以下模块:disablelogging、enablelogging、getacl、getcors、getdefacl、getlogging、setacl、setcors、setdefacl。
我在这里做对了吗?这是 gsutil 中的错误吗?