【发布时间】:2015-06-21 04:25:24
【问题描述】:
尝试运行此代码:
import boto
s3 = boto.connect_s3()
bucket = s3.create_bucket('hopethisworks') # bucket names must be unique
key = bucket.new_key('examples/first_file.csv')
key.set_contents_from_filename('C:\Python27\all_month.csv')
key.set_acl('public-read')
得到以下错误:
IOError: [Errno 22] 无效模式 ('rb') 或文件名:'C:\Python27\x07ll_month.csv'
我该如何克服这个问题?
【问题讨论】: