Forums

cloudinary

I keep getting the error raise Error("Unexpected error - {0!r}".format(e)) cloudinary.exceptions.Error: Unexpected error - MaxRetryError("TCPKeepAliveHTTPSConnectionPool(host='api.cloudinary.com', port=443): Max retries exceeded with url: /v1_1/<my_storage_name>/image/upload (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f990d5decb0>: Failed to establish a new connection: [Errno 111] Connection refused'))"). it works fine on localhost. this is the code from my settings.py CLOUDINARY_STORAGE = { 'CLOUD_NAME': os.getenv('CLOUD_STORAGE_NAME'), 'API_KEY': os.getenv('CLOUD_STORAGE_API_KEY'), 'API_SECRET': os.getenv('CLOUD_STORAGE_API_SECRET'), }

if not DEBUG: DEFAULT_FILE_STORAGE = 'cloudinary_storage.storage.MediaCloudinaryStorage'

but cloudinary.com is on the list of allowed sites

Make sure that you are using proxy. See https://help.pythonanywhere.com/pages/403ForbiddenError/#proxy-details