I am following instructions from Install and Set Up | ArcGIS for Developers and I believe I have it installed correctly. Note that I am in a very secured environment and such.
When I try to run the "Hello World" type of test, it fails with following error. I have tried updating the following based on
SSL verification error on Windows · Issue #494 · ContinuumIO/anaconda-issues · GitHub but in vain.
In .condarc, set the following
- ssl_verify: False
Note that this DISABLES verification of SSL certificiates.
You can accomplish this with the following command
conda config --set ssl_verify False
Upgrade openssl and cryptography:
conda update openssl cryptography
Update certifi:
conda update certifi
Re-enable SSL verification by removing the ssl_verify line from .condarc
How can move forward and resolve this issue....?
---------------------------------------------------------------------------
SSLError Traceback (most recent call last)
D:\Program Files (x86)\Anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
1253 try:
-> 1254 h.request(req.get_method(), req.selector, req.data, headers)
1255 except OSError as err: # timeout error
D:\Program Files (x86)\Anaconda3\lib\http\client.py in request(self, method, url, body, headers)
1105 """Send a complete request to the server."""
-> 1106 self._send_request(method, url, body, headers)
1107
D:\Program Files (x86)\Anaconda3\lib\http\client.py in _send_request(self, method, url, body, headers)
1150 body = _encode(body, 'body')
-> 1151 self.endheaders(body)
1152
D:\Program Files (x86)\Anaconda3\lib\http\client.py in endheaders(self, message_body)
1101 raise CannotSendHeader()
-> 1102 self._send_output(message_body)
1103
D:\Program Files (x86)\Anaconda3\lib\http\client.py in _send_output(self, message_body)
933
--> 934 self.send(msg)
935 if message_body is not None:
D:\Program Files (x86)\Anaconda3\lib\http\client.py in send(self, data)
876 if self.auto_open:
--> 877 self.connect()
878 else:
D:\Program Files (x86)\Anaconda3\lib\http\client.py in connect(self)
1259 self.sock = self._context.wrap_socket(self.sock,
-> 1260 server_hostname=server_hostname)
1261 if not self._context.check_hostname and self._check_hostname:
D:\Program Files (x86)\Anaconda3\lib\ssl.py in wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname)
376 server_hostname=server_hostname,
--> 377 _context=self)
378
D:\Program Files (x86)\Anaconda3\lib\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)
751 raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")
--> 752 self.do_handshake()
753
D:\Program Files (x86)\Anaconda3\lib\ssl.py in do_handshake(self, block)
987 self.settimeout(None)
--> 988 self._sslobj.do_handshake()
989 finally:
D:\Program Files (x86)\Anaconda3\lib\ssl.py in do_handshake(self)
632 """Start the SSL/TLS handshake."""
--> 633 self._sslobj.do_handshake()
634 if self.context.check_hostname:
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)
During handling of the above exception, another exception occurred:
URLError Traceback (most recent call last)
<ipython-input-1-9d37624d78f7> in <module>()
1 from arcgis.gis import GIS
----> 2 my_gis = GIS()
3 my_gis.map()
D:\Program Files (x86)\Anaconda3\lib\site-packages\arcgis\gis.py in __init__(self, url, username, password, key_file, cert_file, verify_cert, set_active)
91 self._datastores_list = None
92 self._portal = portalpy.Portal(self._url, self._username, self._password, self._key_file, self._cert_file,
---> 93 verify_cert=self._verify_cert)
94
95 if self._url.lower() == "pro":
D:\Program Files (x86)\Anaconda3\lib\site-packages\arcgis\_impl\portalpy.py in __init__(self, url, username, password, key_file, cert_file, expiration, referer, proxy_host, proxy_port, connection, workdir, tokenurl, verify_cert)
157 proxy_host=proxy_host,
158 proxy_port=proxy_port,
--> 159 verify_cert=verify_cert)
160 #self.get_version(True)
161 self.get_properties(True)
D:\Program Files (x86)\Anaconda3\lib\site-packages\arcgis\_impl\connection.py in __init__(self, baseurl, tokenurl, username, password, key_file, cert_file, expiration, all_ssl, referer, proxy_host, proxy_port, connection, verify_cert)
272
273 if cert_file is None and key_file is None:
--> 274 self.login(username, password, expiration)
275
276 #----------------------------------------------------------------------
D:\Program Files (x86)\Anaconda3\lib\site-packages\arcgis\_impl\connection.py in login(self, username, password, expiration)
422 self._token = newtoken
423
--> 424 resp = self.post('', { 'f': 'json' }, add_token=False) # probe portal to find auth scheme
425 # if basic, digest, NTLM or Kerberos, etc is being used
426 # except handler will catch it and set self._auth appropriately
D:\Program Files (x86)\Anaconda3\lib\site-packages\arcgis\_impl\connection.py in post(self, path, postdata, files, ssl, compress, is_retry, use_ordered_dict, add_token, verify_cert, token)
917 opener.addheaders = headers
918 #print("***"+url)
--> 919 resp = opener.open(url, data=encoded_postdata.encode())
920 resp_data, is_file = self._process_response(resp)
921
D:\Program Files (x86)\Anaconda3\lib\urllib\request.py in open(self, fullurl, data, timeout)
464 req = meth(req)
465
--> 466 response = self._open(req, data)
467
468 # post-process response
D:\Program Files (x86)\Anaconda3\lib\urllib\request.py in _open(self, req, data)
482 protocol = req.type
483 result = self._call_chain(self.handle_open, protocol, protocol +
--> 484 '_open', req)
485 if result:
486 return result
D:\Program Files (x86)\Anaconda3\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args)
442 for handler in handlers:
443 func = getattr(handler, meth_name)
--> 444 result = func(*args)
445 if result is not None:
446 return result
D:\Program Files (x86)\Anaconda3\lib\urllib\request.py in https_open(self, req)
1295 def https_open(self, req):
1296 return self.do_open(http.client.HTTPSConnection, req,
-> 1297 context=self._context, check_hostname=self._check_hostname)
1298
1299 https_request = AbstractHTTPHandler.do_request_
D:\Program Files (x86)\Anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args)
1254 h.request(req.get_method(), req.selector, req.data, headers)
1255 except OSError as err: # timeout error
-> 1256 raise URLError(err)
1257 r = h.getresponse()
1258 except:
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645)>