Notebook wont work after updating ArcGIS Pro to latest release

239
6
Jump to solution
11-08-2021 08:54 AM
StuartMoore
Occasional Contributor III

has anyone else had issues after updating ArcGIS Pro to the latest version (2.8.3) with Notebooks?

this code use to work (ive simplified it but its as below)

xxM = gis.content.get("54e........")
xxLive = xxM.layers[12]
NewxxLive = xxLive.query(where="OBJECTID = 1")

i now get this error:

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
In  [21]:
Line 50:    NewxxLive = xxLive.query(where="OBJECTID = 1")

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\layer.py, in query:
Line 1547:  record_count = self._query(url, params, raw=as_raw)

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\layer.py, in _query:
Line 2563:  raise queryException

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\layer.py, in _query:
Line 2533:  postdata=params, token=self._token)

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py, in post:
Line 720:   force_bytes=kwargs.pop('force_bytes', False))

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py, in _handle_response:
Line 514:   self._handle_json_error(data['error'], errorcode)

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\_impl\_con\_connection.py, in _handle_json_error:
Line 536:   raise Exception(errormessage)

Exception: Invalid Token
(Error Code: 498)
---------------------------------------------------------------------------

 but whats really odd is that i can list all the fields that are in that layer

for f in xxLive.properties.fields:
    print(f['name'])

 

what has this new version done...

1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

I can't help because the line numbers in the trackback don't line up with my version (1.9.1).  You could try updating to the latest version, or update ArcGIS Pro to 2.9 when it comes out of beta final very soon, (it uses 1.9.1)


... sort of retired...

View solution in original post

0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

are you using arcgis 1.9.1?


... sort of retired...
0 Kudos
StuartMoore
Occasional Contributor III

Hi @DanPatterson since the update its using arcgis 1.8.5 i think it was 1.8.4 before the update...

 

Stu

0 Kudos
DanPatterson
MVP Esteemed Contributor

I can't help because the line numbers in the trackback don't line up with my version (1.9.1).  You could try updating to the latest version, or update ArcGIS Pro to 2.9 when it comes out of beta final very soon, (it uses 1.9.1)


... sort of retired...
0 Kudos
StuartMoore
Occasional Contributor III

Thanks @DanPatterson I’ll keep trying 

0 Kudos
StuartMoore
Occasional Contributor III

upgraded to 2.9 last night and it seems to be working again :)

0 Kudos
DanPatterson
MVP Esteemed Contributor

glad it worked out


... sort of retired...