tensorflowのAPIでjupyter上からs3のバケットにアクセスしようとしたのですが、バケットがないとエラーが出ます
Object s3://バケット名/バケット配下のフォルダ名/train_0.tfrecords does not exist
下記のコードでアクセスキーとシークレットキーは間違っていません。
特にリージョンも間違っていないのに、なぜエラーが出るのでしょうか?
ご教授お願いします
python
1AWS_ACCESS_KEY_ID='アクセスキー' 2AWS_SECRET_ACCESS_KEY='シークレットキー' 3AWS_REGION='ap-northeast-1' 4S3_ENDPOINT='s3.ap-northeast-1.amazonaws.com' 5S3_USE_HTTPS=1 6S3_VERIFY_SSL=1 7 8print(file_io.stat('s3://バケット名/バケット配下のフォルダ名/train_0.tfrecords')) 9 10 11# エラー 12NotFoundError Traceback (most recent call last) 13<ipython-input-53-5877f486a5d5> in <module>() 14 8 S3_USE_HTTPS=1 15 9 S3_VERIFY_SSL=1 16---> 10 print(file_io.stat('s3://image-ogawa/image-ogawa/train_0.tfrecords')) 17 18~/anaconda3/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py in stat(filename) 19 551 with errors.raise_exception_on_not_ok_status() as status: 20 552 pywrap_tensorflow.Stat(compat.as_bytes(filename), file_statistics, status) 21--> 553 return file_statistics 22 23~/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py in __exit__(self, type_arg, value_arg, traceback_arg) 24 517 None, None, 25 518 compat.as_text(c_api.TF_Message(self.status.status)), 26--> 519 c_api.TF_GetCode(self.status.status)) 27 520 # Delete the underlying status object from memory otherwise it stays alive 28 521 # as there is a reference to status from this from the traceback due to 29 30NotFoundError: Object s3://バケット名/フォルダ名/train_0.tfrecords does not exist
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/11/08 06:11
2018/11/09 02:18