Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581) #12

Open
AlirezaSadeghi opened this issue Aug 12, 2015 · 1 comment

Comments

@AlirezaSadeghi
Copy link

When i try to save a model with an ImageField in the admin, I get this SSLError. Following is the traceback from save_model function of the admin to the place the exception happened.
Any idea why ?

File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/contrib/admin/options.py", line 1078, in save_model
obj.save()
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/base.py", line 710, in save
force_update=force_update, update_fields=update_fields)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/base.py", line 738, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/base.py", line 822, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/base.py", line 861, in _do_insert
using=using, raw=raw)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(_args, *_kwargs)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/query.py", line 920, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 973, in execute_sql
for sql, params in self.as_sql():
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 931, in as_sql
for obj in self.query.objs
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/fields/files.py", line 315, in pre_save
file.save(file.name, file, save=False)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/db/models/fields/files.py", line 94, in save
self.name = self.storage.save(name, content, max_length=self.field.max_length)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django/core/files/storage.py", line 64, in save
name = self._save(name, content)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/django_google_storage/storage.py", line 148, in _save
k = self.bucket.get_key(self._encode_name(name))
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/boto/gs/bucket.py", line 108, in get_key
query_args_l=query_args_l)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/boto/s3/bucket.py", line 199, in _get_key_internal
query_args=query_args)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/boto/s3/connection.py", line 664, in make_request
retry_handler=retry_handler
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/boto/connection.py", line 1071, in make_request
retry_handler=retry_handler)
File "/Users/alirezasadeghi/envs/pushe/lib/python2.7/site-packages/boto/connection.py", line 1030, in _mexe
raise ex
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)

@AlirezaSadeghi
Copy link
Author

I need to say this issue's produced using mac OS X, it didn't happen when using Ubuntu, this is also a good place to look at :
https://django-storages.readthedocs.org/en/latest/backends/apache_libcloud.html#certifcate-authorities

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant