gpt4 book ai didi

azure - 使用 AzureML 通过数据存储上传数据时出现 403 错误

转载 作者:行者123 更新时间:2023-12-02 04:27:12 25 4
gpt4 key购买 nike

我只想将本地笔记本电脑上的数据上传到数据存储。但出现 HTTP 403 错误。

您能告诉我如何上传数据吗?

有错误消息。

ds

ds.upload(src_dir = './MNIST_data/', target_path='MNIST_data', overwrite=True, show_progress=True) Client-Request-ID=5b78750a-ee2f-11e8-bf9a-b46bfcb19fb2 Retry policy did not allow for a retry: Server-Timestamp=Thu, 22 Nov 2018 08:19:40 GMT, HTTP status code=40./BODY>ror 403. The request URL is forbidden.

set=us-ascii">//www.w3.org/TR/html4/strict.dtd"> Traceback (most recent call last): File "", line 1, in File "C:\python-anaconda\lib\site-packages\azureml\data\azure_storage_datastore.py", line 380, in upload self._file_share_upload File "C:\python-anaconda\lib\site-packages\azureml\data\azure_storage_datastore.py", line 235, in _start_upload_task task_fn = task_generator(target_file_path, src_file_path) File "C:\python-anaconda\lib\site-packages\azureml\data\azure_storage_datastore.py", line 451, in _file_share_upload if not self.file_service.exists(self.container_name, dirpath): File "C:\python-anaconda\lib\site-packages\azureml_vendor\azure_storage\file\fileservice.py", line 1306, in exists _dont_fail_not_exist(ex) File "C:\python-anaconda\lib\site-packages\azureml_vendor\azure_storage\common_error.py", line 97, in _dont_fail_not_exist raise error File "C:\python-anaconda\lib\site-packages\azureml_vendor\azure_storage\file\fileservice.py", line 1303, in exists self._perform_request(request, expected_errors=expected_errors) File "C:\python-anaconda\lib\site-packages\azureml_vendor\azure_storage\common\storageclient.py", line 381, in _perform_request raise ex File "C:\python-anaconda\lib\site-packages\azureml_vendor\azure_storage\common\storageclient.py", line 306, in _perform_request raise ex File "C:\python-anaconda\lib\site-packages\azureml_vendor\azure_storage\common\storageclient.py", line 292, in _perform_request HTTPError(response.status, response.message, response.headers, response.body)) File "C:\python-anaconda\lib\site-packages\azureml_vendor\azure_storage\common_error.py", line 115, in _http_error_handler raise ex azure.common.AzureHttpError: Forbidden Forbidden

Forbidden URL


HTTP Error 403. The request URL is forbidden.

最佳答案

上传函数不接受 src_dir 中的尾随/

更改:

s.upload(src_dir = './MNIST_data/', target_path='data')

进入:

s.upload(src_dir = './MNIST_data', target_path='data')

MINJI PARK 在评论中亲自提供了正确答案

关于azure - 使用 AzureML 通过数据存储上传数据时出现 403 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53426855/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com