I've been trying to follow the ESRI recommended workflow to log on to Enterprise (using authentication), but it just doesn't want to work. I'm able to get the account credentials registered in Windows Credential Manager, but if I try to run the program and access them via the API for Python, I keep receiving this error:
AttributeError Traceback (most recent call last)
<ipython-input-1-9fd4325b765b> in <module>
11
12
---> 13 gis =GIS(portal_url,profile=portal_profile, verify_cert=portal_cert_check)
14 print('Good')
~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\gis\__init__.py in __init__(self, url, username, password, key_file, cert_file, verify_cert, set_active, client_id, profile, **kwargs)
337 "argument when connecting to the GIS.")
338 else:
--> 339 raise e
340 try:
341 if url.lower().find("arcgis.com") > -1 and \
~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\gis\__init__.py in __init__(self, url, username, password, key_file, cert_file, verify_cert, set_active, client_id, profile, **kwargs)
321 expiration=self._expiration,
322 referer=self._referer,
--> 323 custom_auth=custom_auth)
324 if self._is_hosted_nb_home:
325 # For GIS("home") objects, force no referer passed in
~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\gis\_impl\_portalpy.py in __init__(self, url, username, password, key_file, cert_file, expiration, referer, proxy_host, proxy_port, connection, workdir, tokenurl, verify_cert, client_id, custom_auth, token)
165 client_id=client_id,
166 custom_auth=custom_auth,
--> 167 token=token)
168 #self.get_version(True)
169 self.get_properties(True)
~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\gis\_impl\_con\_connection.py in __init__(self, baseurl, username, password, **kwargs)
156 self._auth = "PKI"
157
--> 158 self._create_session()
159
160 # Product Info
~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\gis\_impl\_con\_connection.py in _create_session(self)
260 self._session.auth = GuessAuth(username=self._username,
261 password=self._password)
--> 262 elif self._auth.lower() == "pro":
263 self._session.auth = GuessAuth(None, None)
264 else:
AttributeError: 'NoneType' object has no attribute 'lower'
if
statement (at least) is needed to expose the bug.