<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JobManager AttributeError in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/jobmanager-attributeerror/m-p/1644864#M11595</link>
    <description>&lt;P&gt;The error is from a Python API/server mismatch, not your idea. Two things to check, then two working patterns.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Check first&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;The GP service must be &lt;STRONG&gt;asynchronous&lt;/STRONG&gt; (executionType = esriExecutionTypeAsynchronous). Synchronous tasks have no jobs.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Your &lt;STRONG&gt;ArcGIS API for Python&lt;/STRONG&gt; in Pro is older than your Server (11.x). Newer Server returns a list for results, but the older client expects a dict → your AttributeError.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Fix options&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A) Use the supported Admin path (works when versions mismatch):&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS

gis = GIS("https://yourportal/portal", "admin", "pwd")
srv  = gis.admin.servers.list()[0]                       # pick the hosting/server
svc  = srv.services.get("Folder/MyGPService.GPServer")   # or just "MyGPService.GPServer"

# hit the /jobs endpoint directly
resp = svc._con.get(f"{svc._url}/jobs", params={"f":"json"})   # add filters: status, startTime, endTime
jobs = resp.get("jobs", [])
print(len(jobs), jobs[:3])&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;B) Update the client, then use the high-level helper:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;In Pro’s &lt;STRONG&gt;Python Package Manager&lt;/STRONG&gt;, update to the latest &lt;STRONG&gt;arcgis&lt;/STRONG&gt; package.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Then:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="python"&gt;jobs = svc.jobs.search(status="esriJobSucceeded")  # should now work&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Notes&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;If your service has &lt;STRONG&gt;multiple tasks&lt;/STRONG&gt;, you can also query per task:&lt;BR /&gt;.../GPServer/&amp;lt;TaskName&amp;gt;/jobs?f=json&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;For federated sites, use the &lt;STRONG&gt;Server Admin URL&lt;/STRONG&gt; (…/arcgis/&lt;STRONG&gt;admin&lt;/STRONG&gt;/services/…/jobs) when you need full history.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Fri, 22 Aug 2025 20:13:32 GMT</pubDate>
    <dc:creator>VenkataKondepati</dc:creator>
    <dc:date>2025-08-22T20:13:32Z</dc:date>
    <item>
      <title>JobManager AttributeError</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/jobmanager-attributeerror/m-p/1644765#M11593</link>
      <description>&lt;P&gt;I'm attempting to look at the jobs for a GPService, but I get the following Attribute Error. I guess my question is "am I doing this right?" - I have a GPService that is an&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;arcgis.gis.server.admin._services.Service&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, from which I get the &lt;A href="https://developers.arcgis.com/python/latest/api-reference/arcgis.gis.server.html#arcgis.gis.server.JobManager" target="_blank" rel="noopener"&gt;JobManager&lt;/A&gt;, and from that, I thought, the jobs...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Maybe a more general way to frame the question is "how do I get all the jobs for a given GPService?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;jobs = service.jobs.search()

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[28], line 1
----&amp;gt; 1 jobs = service.jobs.search()

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\gis\server\admin\_services.py:2123, in JobManager.search(self, start_time, end_time, status, username, machine)
   2119 results = []
   2120 res = self._con.get(url, params)
   2121 results = [
   2122     Job(url="%s/%s" % (self._url, key), con=self._con)
-&amp;gt; 2123     for key in res["results"].keys()
   2124 ]
   2125 while res["nextStart"] &amp;gt; -1:
   2126     params["start"] = res["nextStart"]

AttributeError: 'list' object has no attribute 'keys'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Aug 2025 17:24:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/jobmanager-attributeerror/m-p/1644765#M11593</guid>
      <dc:creator>tcrammond</dc:creator>
      <dc:date>2025-08-22T17:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: JobManager AttributeError</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/jobmanager-attributeerror/m-p/1644864#M11595</link>
      <description>&lt;P&gt;The error is from a Python API/server mismatch, not your idea. Two things to check, then two working patterns.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Check first&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;The GP service must be &lt;STRONG&gt;asynchronous&lt;/STRONG&gt; (executionType = esriExecutionTypeAsynchronous). Synchronous tasks have no jobs.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Your &lt;STRONG&gt;ArcGIS API for Python&lt;/STRONG&gt; in Pro is older than your Server (11.x). Newer Server returns a list for results, but the older client expects a dict → your AttributeError.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Fix options&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A) Use the supported Admin path (works when versions mismatch):&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS

gis = GIS("https://yourportal/portal", "admin", "pwd")
srv  = gis.admin.servers.list()[0]                       # pick the hosting/server
svc  = srv.services.get("Folder/MyGPService.GPServer")   # or just "MyGPService.GPServer"

# hit the /jobs endpoint directly
resp = svc._con.get(f"{svc._url}/jobs", params={"f":"json"})   # add filters: status, startTime, endTime
jobs = resp.get("jobs", [])
print(len(jobs), jobs[:3])&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;B) Update the client, then use the high-level helper:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;In Pro’s &lt;STRONG&gt;Python Package Manager&lt;/STRONG&gt;, update to the latest &lt;STRONG&gt;arcgis&lt;/STRONG&gt; package.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Then:&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="python"&gt;jobs = svc.jobs.search(status="esriJobSucceeded")  # should now work&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Notes&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;If your service has &lt;STRONG&gt;multiple tasks&lt;/STRONG&gt;, you can also query per task:&lt;BR /&gt;.../GPServer/&amp;lt;TaskName&amp;gt;/jobs?f=json&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;For federated sites, use the &lt;STRONG&gt;Server Admin URL&lt;/STRONG&gt; (…/arcgis/&lt;STRONG&gt;admin&lt;/STRONG&gt;/services/…/jobs) when you need full history.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 22 Aug 2025 20:13:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/jobmanager-attributeerror/m-p/1644864#M11595</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2025-08-22T20:13:32Z</dc:date>
    </item>
  </channel>
</rss>

