0

I reinstall new ubuntu 14:04 on my machine then I started to receive this error while in old installation the program works perfect without any annoying errors. Any help please. BTW I found question here cant load mnist dataset in keras but it looks different error and mine was working without any problem.

Using Theano backend.
Using gpu device 0: GeForce GTX TITAN X (CNMeM is disabled, cuDNN 5005)
Downloading data from https://s3.amazonaws.com/img-datasets/mnist.pkl.gz
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mnist_cnnFORTESTING.py", line 9, in <module>
execfile("file.py")
File "file.py", line 28, in <module>
(X_train, y_train), (X_test, y_test) = mnist.load_data()
File "/home/sal/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/keras/datasets/mnist.py", line 9, in load_data
path = get_file(path, origin="https://s3.amazonaws.com/img-datasets/mnist.pkl.gz")
File "/home/sal/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/keras/utils/data_utils.py", line 70, in get_file
raise Exception(error_msg.format(origin, e.errno, e.reason))
Exception: URL fetch failure on https://s3.amazonaws.com/img-datasets/mnist.pkl.gz: None -- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify   failed (_ssl.c:590)
Community
  • 1
  • 1
S.AMEEN
  • 1,461
  • 4
  • 16
  • 23
  • 1
    Definitely different (trhis is not a read attempt on a write only GzipFile object ;-) I think the verification of a cert for the SSL connect failed like last line error message states `... [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) ...` - so maybe a mismatch between ssl libs and python version, script or ... – Dilettant Jun 02 '16 at 16:02
  • @ Dilettant could you please tell me how I can sort this out? it took me a week to install and reinstall theano and keras on ubuntu 14 with GPU. – S.AMEEN Jun 02 '16 at 16:05
  • 1
    I am sorry to read this, but am happy I could help and you found a solution to this problem that seems to have blocked you for a week. Now good luck with the real work! – Dilettant Jun 02 '16 at 16:23

1 Answers1

2

WOW I found the answer, just use

   sudo mkdir -p /etc/pki/tls
   sudo ln -s /etc/ssl/certs /etc/pki/tls/certs

I found the answer in the following link by the clue of @ Dilettant thanks https://support.enthought.com/hc/en-us/articles/204646264-Linux-non-RHEL-Python-code-fails-to-connect-to-https-with-certificate-errors

S.AMEEN
  • 1,461
  • 4
  • 16
  • 23