AnsweredAssumed Answered

JSONDecodeError When Accessing a Feature Layer

Question asked by jrmatchett on Feb 24, 2020
Latest reply on Feb 25, 2020 by bixb0012

I'm trying to query a particular feature layer (

but receive a JSONDecodeError. Here's my code and result:

from arcgis.features import FeatureLayer

adds_layer = FeatureLayer('')

adds = adds_layer.query()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/site-packages/arcgis/features/", line 1019, in query
    record_count = self._query(url, params, raw=as_raw)
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/site-packages/arcgis/features/", line 1960, in _query
    raise queryException
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/site-packages/arcgis/features/", line 1930, in _query
    postdata=params, token=self._token)
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/site-packages/arcgis/gis/", line 10101, in _token
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/site-packages/arcgis/gis/", line 10071, in _hydrate
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/site-packages/arcgis/gis/", line 10038, in _refresh
    raise e
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/site-packages/arcgis/gis/", line 10033, in _refresh
    dictdata =, params, token=self._lazy_token)
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/site-packages/arcgis/_impl/", line 1148, in post
    resp_json = json.loads(resp_data)
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/json/", line 348, in loads
    return _default_decoder.decode(s)
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/json/", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/jrmatchett/opt/anaconda3/envs/arcgis17/lib/python3.7/json/", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I can access and query the layer just fine via its webpage or when adding it to a web map. Accessing some other feature layer properties, such as properties and metadata, generates the same error. I experience the issue when using either versions 1.6.2 or 1.7.1 of the arcgis python API.