libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [libcloud] nocko opened a new issue #1338: Backblaze B2: AUTH_API_HOST not picking up the default
Date Wed, 07 Aug 2019 11:03:09 GMT
nocko opened a new issue #1338: Backblaze B2: AUTH_API_HOST not picking up the default
URL: https://github.com/apache/libcloud/issues/1338
 
 
   **## Summary
   
   Running the demo code in the docs:
   
   ```
   from libcloud.storage.types import Provider
   from libcloud.storage.providers import get_driver
   
   account_id = 'XXXXXX'
   application_key = 'YYYYYY'
   
   cls = get_driver(Provider.BACKBLAZE_B2)
   driver = cls(account_id, application_key)
   driver.list_containers()
   ```
   
   Produces the error:
   
   ```
   requests.exceptions.ConnectionError: HTTPSConnectionPool(host='none', port=443): Max retries
exceeded with url: /b2api/v1/b2_list_buckets?accountId=xxxxxxxxxx (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection
object at 0x7f7366797610>: Failed to establish a new connection: [Errno -5] No address
associated with hostname'))
   
   ```
   
   
   then it works as intended
   
   If the host is supplied to the constructor, then it works as intended:
   ```
   driver = cls(account_id, application_key, host='api.backblaze.com')
   ```
   
   I can replicate this on Python 2 and Python 3. I am using libcloud via django-storages,
so there isn't a way for me to pass the hostname via the constructor. 
   
   Looking at the backblaze provider the default host is provided and correct, but somehow
now making it into the connection object before request is called.
   
   I can take another look at this this afternoon, but a patch didn't jump out at me immediately.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message