Continue in the app
Be The First To Get Support Updates
Want to know about the latest technical content and software updates?

Error: json.decoder.JSONDecoderError:Expecting value: line 1 column 1

Error Message

Running an ArcGIS API for Python script that requires signing in to Portal for ArcGIS may fail and return the following error:

json.decoder.JSONDecoderError:Expecting value: line 1 column 1
Error return in the Python console when running the script to log into Portal for ArcGIS


This error occurs when attempting to connect to Portal for ArcGIS using the domain name server (DNS) alias and the portal is authenticating through a web-tier authentication (IWA or SAML).

Solution or Workaround

To solve this issue, use the fully qualified domain name (FQDN) to connect to the portal.

gis = GIS("https://<machine.domain.com>:7443/arcgis", "username", "password", verify_cert = False)
For portals authenticating through web-tier authentication, using the FQDN with port 7443 is the only workaround for this issue, and users are unable to use DNS within the script.
The script sample of connecting to the portal using the FQDN

Related Information

Last Published: 8/5/2021

Article ID: 000024610

Software: ArcGIS API for Python 1.9, 1.8.5, 1.8.4, 1.8.3, 1.8.2, 1.8.1, 1.8.0, 1.7.1, 1.7.0, 1.6.1, 1.6 Portal for ArcGIS 10.9, 10.8.1, 10.8, 10.7.1, 10.7, 10.6.1, 10.6