You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Uploading a file into S3 . I am getting below error.
ERROR: **<LibcloudError in <class 'libcloud.storage.drivers.s3.S3StorageDriver'> 'This bucket is located in a different region. Please use the correct driver.'>**
## Detailed Information
Version of libcloud: 2.6.1
Python version: 3.7 code:
`import libcloud
from libcloud.storage.types import Provider
from libcloud.storage.providers import get_driver
FILE_PATH = 'filepath'
cls = get_driver(Provider.S3)
driver = cls('api key','api secret key')
container = driver.get_container(container_name='my-backups-12345')
extra = {'content_type': 'application/octet-stream'}
with open(FILE_PATH, 'rb') as iterator:
obj = driver.upload_object_via_stream(iterator=iterator,
container=container,
object_name='images_backup.tar',
extra=extra)
In the above code i mentioned correct driver then also am getting below error.please help me on this issue.Am I missing something?
The text was updated successfully, but these errors were encountered:
@570096 I suggest you to install the latest stable version of Libcloud (v2.7.0) and then pass region=<region name> argument to the driver constructor and make sure the region matches the region where the bucket is located.
In v2.7.0, that exception has also been improved so the error now also includes the name of the region where the bucket in question is located.
For example, if your driver is located in the us-west-2 region, you would instantiate a driver like this:
## Summary
Uploading a file into S3 . I am getting below error.
ERROR:
**<LibcloudError in <class 'libcloud.storage.drivers.s3.S3StorageDriver'> 'This bucket is located in a different region. Please use the correct driver.'>**
## Detailed Information
Version of libcloud: 2.6.1
Python version: 3.7
code:
In the above code i mentioned correct driver then also am getting below error.please help me on this issue.Am I missing something?
The text was updated successfully, but these errors were encountered: