【发布时间】:2019-02-14 04:13:10
【问题描述】:
我正在尝试从 Google 存储中下载一些样本来进行情绪分析。我按照说明进行操作,但出现错误(我实际上在他们的说明中添加了一个目标文件,但错误不同):
Google 在示例中定义的错误: 豪尔赫:python3.7 jbp$ gsutil cp gs://cloud-samples-tests/natural-language/sentiment-samples.tgz CommandException:“cp”命令的参数数量错误。 回溯(最近一次通话最后): 文件“”,第 1 行,在 文件“/Users/jbp/Python/env/lib/python3.7/google-cloud-sdk/platform/gsutil/gslib/init.py”,第 29 行,在 导入临时文件 文件“tempfile.py”,第 39 行,在 将 functools 导入为 _functools 文件“functools.py”,第 8 行 SyntaxError:第 8 行文件 functools.py 中的非 ASCII 字符“\xc5”,但未声明编码;详情见http://python.org/dev/peps/pep-0263/ Jorges-MBP:python3.7 jbarrigapartarrieu$
目标文件错误:
豪尔赫:python3.7 jbp$ gsutil cp gs://cloud-samples-tests/natural-language/sentiment-samples.tgz /User/jbp/Python
复制 gs://cloud-samples-tests/natural-language/sentiment-samples.tgz...
OSError:权限被拒绝。千字节]
回溯(最近一次通话最后):
文件“”,第 1 行,在
文件“/Users/jbarrigapartarrieu/Python/env/lib/python3.7/google-cloud-sdk/platform/gsutil/gslib/init.py”,第 29 行,在
导入临时文件
文件“tempfile.py”,第 39 行,在
将 functools 导入为 _functools
文件“functools.py”,第 8 行
SyntaxError:第 8 行文件 functools.py 中的非 ASCII 字符“\xc5”,但未声明编码;详情见http://python.org/dev/peps/pep-0263/
【问题讨论】: