Comments (9)
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>
This error to be exact when calling the maybe_download() function, can you help me fix it please
from tensorflow-tutorials.
are you on a mac? make sure you run system updates. I found this shell code useful.
https://github.com/albinekcom/updater-for-macos
from tensorflow-tutorials.
Yes. I can try that but my inception5h and inception models load perfectly fine..
from tensorflow-tutorials.
are they all hosted on same server? you may find one specific server has an out of date certificate. actually the script above - probably won't help - unless you need to update the root cert/ which may help. try hitting url in browser and see if you get ssl error.
from tensorflow-tutorials.
I tried that too and the url doesn't give me an error then but starts to download the model. I have tried to find some other url from where I can download the model. But I can't..
How do I update the root cert?
from tensorflow-tutorials.
SSLError Traceback (most recent call last)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
1317 h.request(req.get_method(), req.selector, req.data, headers,
-> 1318 encode_chunked=req.has_header('Transfer-encoding'))
1319 except OSError as err: # timeout error
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in request(self, method, url, body, headers, encode_chunked)
1238 """Send a complete request to the server."""
-> 1239 self._send_request(method, url, body, headers, encode_chunked)
1240
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)
1284 body = _encode(body, 'body')
-> 1285 self.endheaders(body, encode_chunked=encode_chunked)
1286
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in endheaders(self, message_body, encode_chunked)
1233 raise CannotSendHeader()
-> 1234 self._send_output(message_body, encode_chunked=encode_chunked)
1235
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in _send_output(self, message_body, encode_chunked)
1025 del self._buffer[:]
-> 1026 self.send(msg)
1027
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in send(self, data)
963 if self.auto_open:
--> 964 self.connect()
965 else:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py in connect(self)
1399 self.sock = self._context.wrap_socket(self.sock,
-> 1400 server_hostname=server_hostname)
1401 if not self._context.check_hostname and self._check_hostname:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py in wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, session)
400 server_hostname=server_hostname,
--> 401 _context=self, _session=session)
402
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py in init(self, sock, keyfile, certfile, server_side, cert_reqs, ssl_version, ca_certs, do_handshake_on_connect, family, type, proto, fileno, suppress_ragged_eofs, npn_protocols, ciphers, server_hostname, _context, _session)
807 raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
--> 808 self.do_handshake()
809
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py in do_handshake(self, block)
1060 self.settimeout(None)
-> 1061 self._sslobj.do_handshake()
1062 finally:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py in do_handshake(self)
682 """Start the SSL/TLS handshake."""
--> 683 self._sslobj.do_handshake()
684 if self.context.check_hostname:
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
During handling of the above exception, another exception occurred:
URLError Traceback (most recent call last)
in ()
----> 1 vgg16.maybe_download()
/Users/qindeelishtiaq1/vgg16.py in maybe_download()
60 # This function should not extract the file when it does not have
61 # a relevant filename-extensions such as .zip or .tar.gz
---> 62 download.maybe_download_and_extract(url=data_url, download_dir=data_dir)
63
64
/Users/qindeelishtiaq1/download.py in maybe_download_and_extract(url, download_dir)
77 file_path, _ = urllib.request.urlretrieve(url=url,
78 filename=file_path,
---> 79 reporthook=_print_download_progress)
80
81 print()
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in urlretrieve(url, filename, reporthook, data)
246 url_type, path = splittype(url)
247
--> 248 with contextlib.closing(urlopen(url, data)) as fp:
249 headers = fp.info()
250
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context)
221 else:
222 opener = _opener
--> 223 return opener.open(url, data, timeout)
224
225 def install_opener(opener):
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in open(self, fullurl, data, timeout)
524 req = meth(req)
525
--> 526 response = self._open(req, data)
527
528 # post-process response
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in _open(self, req, data)
542 protocol = req.type
543 result = self._call_chain(self.handle_open, protocol, protocol +
--> 544 '_open', req)
545 if result:
546 return result
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)
502 for handler in handlers:
503 func = getattr(handler, meth_name)
--> 504 result = func(*args)
505 if result is not None:
506 return result
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in https_open(self, req)
1359 def https_open(self, req):
1360 return self.do_open(http.client.HTTPSConnection, req,
-> 1361 context=self._context, check_hostname=self.check_hostname)
1362
1363 https_request = AbstractHTTPHandler.do_request
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
1318 encode_chunked=req.has_header('Transfer-encoding'))
1319 except OSError as err: # timeout error
-> 1320 raise URLError(err)
1321 r = h.getresponse()
1322 except:
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>
In [ ]:
That's the whole error.I don't really understand how to fix it.
from tensorflow-tutorials.
I just checked and the URL with the pre-trained VGG16 model still works:
https://s3.amazonaws.com/cadl/models/vgg16.tfmodel
Unfortunately I don't know what the problem is. If you find the solution then please write it here.
@johndpope very nice of you to help with this!
from tensorflow-tutorials.
As a quick hack, maybe you could download the pre-trained model manually and place it in the right dir?
from tensorflow-tutorials.
I'll assume you solved this problem. Please leave a comment on how you solved it, so it may help others in the future.
from tensorflow-tutorials.
Related Issues (20)
- when i was trying to run this code in pycharm it unables to download inception package and it results to an error ImportError: No module named 'inception' so please help me to overcome on this issue HOT 1
- Tutorial 23: Memory Error HOT 1
- ValueError: Unknown loss function:sparse_cross_entropy HOT 2
- Tutorial 21 Already Exists Error HOT 1
- 23_Time-Series-Prediction.ipynb - Predicting future values when have no test data? HOT 2
- Deprecated scipy libraries HOT 3
- acc = sess.run(accuracy, feed_dict={x: mnist.test.images, y: mnist.test.Lables}) AttributeError: 'DataSet' object has no attribute 'Lables' HOT 2
- using Elmo embedding layer in image captioning model ( Tutorial #22) HOT 1
- Image Caption works poorly HOT 6
- Tutorial 20 ValueError in Keras HOT 3
- TensorFlow 2.0 HOT 3
- Now how to forecast the future without knowing the known values? HOT 2
- AttributeError: module 'tensorflow' has no attribute 'gfile' in style transfer notebook HOT 3
- model.prediction does not match model.evaluation loss error HOT 3
- Tutorial 23 Error: Supplying multiple axes to axis is no longer supported. HOT 1
- ValueError: could not convert string to float: '28-12-2017'. I am training the time series prediction model on stock market data set and faced this error HOT 1
- issue when implementing image caption model HOT 4
- module 'tensorflow.python.ops.variable_scope' has no attribute '_VARSCOPE_KEY' HOT 2
- Korean translation HOT 2
- Tutorial 22_Image_Captioning.ipynb is not working in Colab because of disk space limit HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow-tutorials.