Giter Club home page Giter Club logo

bunnycdn-python-lib's People

Contributors

eternal-f1ame avatar ibot3 avatar joetho786 avatar niveditjain avatar rootforbid avatar ssahillppatell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bunnycdn-python-lib's Issues

socket.gaierror: [Errno 11001] getaddrinfo failed

When i try to upload a file i get few errors i cant find solution doing google search.

My Code

from BunnyCDN.Storage import Storage
from BunnyCDN.CDN import CDN

obj_storage = Storage('MY_STORAGE_API_KEY',
                      storage_zone='my-space', storage_zone_region='DE')

obj_storage.PutFile(file_name='new_thum.jpg',
                    storage_path='new-post/thumnail.jpg', local_upload_file_path='D:/Documents/python/images/')

here is the complete error output when run my python file.

  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\urllib3\connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "C:\Python310\lib\socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\urllib3\connection.py", line 358, in connect   
    conn = self._new_conn()
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\urllib3\connection.py", line 186, in _new_conn 
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000028EC82B4040>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\requests\adapters.py", line 439, in send       
    resp = conn.urlopen(
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\urllib3\util\retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='de.storage.bunnycdn.com', port=443): Max retries exceeded with url: /my-space/new-post/my-thum.jpg (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000028EC82B4040>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\Documents\python\ui-library-automation\bunny\upload.py", line 10, in <module>
    obj_storage.PutFile(file_name='new_thum.jpg',
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\BunnyCDN\Storage.py", line 148, in PutFile     
    response = requests.put(url, data=file_data, headers=self.headers)
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\requests\api.py", line 132, in put
    return request('put', url, data=data, **kwargs)
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\requests\sessions.py", line 542, in request    
    resp = self.send(prep, **send_kwargs)
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\requests\sessions.py", line 655, in send       
    r = adapter.send(request, **kwargs)
  File "D:\Documents\python\ui-library-automation\uilib-env\lib\site-packages\requests\adapters.py", line 516, in send       
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='de.storage.bunnycdn.com', port=443): Max retries exceeded with url: /my-space/new-post/my-thum.jpg (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000028EC82B4040>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

Not yet tested

def UpdatePullZone(self,PullZoneID,OriginUrl,AllowedReferrers,BlockedIps,EnableCacheSlice,EnableGeoZoneUS,EnableGeoZoneEU,EnableGeoZoneASIA,EnableGeoZoneSA,EnableGeoZoneAF,ZoneSecurityEnabled,ZoneSecurityIncludeHashRemoteIP,IgnoreQueryStrings,MonthlyBandwidthLimit,AccessControlOriginHeaderExtensions,EnableAccessControlOriginHeader,BlockRootPathAccess,EnableWebpVary,EnableHostnameVary,EnableCountryCodeVary,EnableLogging,DisableCookies,BudgetRedirectedCountries,BlockedCountries,EnableOriginShield,EnableQueryStringOrdering,CacheErrorResponses,OriginShieldZoneCode,AddCanonicalHeader,CacheControlMaxAgeOverride,AddHostHeader,AWSSigningEnabled,AWSSigningKey,AWSSigningRegionName,AWSSigningSecret,EnableTLS1,LoggingSaveToStorage,LoggingStorageZoneId,LogForwardingEnabled,LogForwardingHostname,LogForwardingPort,LogForwardingToken):

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.