Be The First To Get Support Updates
Want to know about the latest technical content and software updates?
错误:json.decoder.JSONDecoderError:预期值:行 1 列 1
错误消息
运行需要登录 Portal for ArcGIS 的 ArcGIS API for Python 脚本可能会失败并返回以下错误:
错误: json.decoder.JSONDecoderError:预期值:行 1 列 1

原因
当尝试使用域名服务器 (DNS) 别名连接到 Portal for ArcGIS 并且门户正在通过 Web 层(IWA 或 SAML)进行身份验证时,会发生此错误。
解决方案或解决方法
要解决此问题,请使用完全限定域名 (FQDN) 连接到门户。
gis = GIS("https://<machine.domain.com>:7443/arcgis", "username", "password", verify_cert = False)
注: 对于通过 Web 层进行身份验证的门户,通过端口 7443 使用 FQDN 是此问题的唯一解决方法,并且用户无法在脚本中使用 DNS。

相关信息
上次修改时间: 8/5/2021
文章 ID: 000024610
软件: 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