<?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: Mapseries losing connection in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/mapseries-losing-connection/m-p/1024569#M59848</link>
    <description>&lt;P&gt;Are you able to post your map series code so we can see how it is working?&lt;/P&gt;</description>
    <pubDate>Mon, 08 Feb 2021 19:50:06 GMT</pubDate>
    <dc:creator>Kara_Shindle</dc:creator>
    <dc:date>2021-02-08T19:50:06Z</dc:date>
    <item>
      <title>Mapseries losing connection</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-losing-connection/m-p/1024564#M59847</link>
      <description>&lt;P&gt;When exporting mapseries, the first page works, but then when it goes to the second one, it says "Page 2 is not a valid option".&lt;/P&gt;&lt;P&gt;It seems like it's losing connection to the mapseries saying there's only one page in it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the latest version of Pro 2.7.1 (this did the same thing for 2.6 with me, so I figured the upgrade might have fixed it).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;This Mapseries has 6 Pages
1 (print PageNum)
6 (print ms.PageCount)
"MapID" = 'StupidMan123'

Working on map for StupidMan123
Text elements on layout updated
C:\folderpath\_StupidMan123.pdf
Exporting page to Georeferenced PDF for StupidMan123


2 (print PageNum)
1 (print ms.PageCount)
Traceback (most recent call last):
  File "C:\folderpath\MXDddpTest.py", line 49, in &amp;lt;module&amp;gt;
    ms.currentPageNumber = pageNum
  File "C:\folderpath\AppData\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\arcobjects\_base.py", line 109, in _set
    return setattr(self._arc_object, attr_name, cval(val))
ValueError: Invalid page number '2'.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any ideas.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 19:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-losing-connection/m-p/1024564#M59847</guid>
      <dc:creator>EvanLafford1</dc:creator>
      <dc:date>2021-02-08T19:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Mapseries losing connection</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-losing-connection/m-p/1024569#M59848</link>
      <description>&lt;P&gt;Are you able to post your map series code so we can see how it is working?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 19:50:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-losing-connection/m-p/1024569#M59848</guid>
      <dc:creator>Kara_Shindle</dc:creator>
      <dc:date>2021-02-08T19:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Mapseries losing connection</title>
      <link>https://community.esri.com/t5/python-questions/mapseries-losing-connection/m-p/1024578#M59850</link>
      <description>&lt;P&gt;Here's the functional part of it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;mxd = arcpy.mp.ArcGISProject(r"C:\folderpath\arcpymptest.aprx")
df = mxd.listMaps("Map")[0]
lay = mxd.listLayouts("Layout")[0]
ms = lay.mapSeries

print("This Mapseries has " + str(ms.pageCount) + " Pages")

for pageNum in range(1, ms.pageCount + 1):
    print(pageNum)
    print(ms.pageCount)
    ms.currentPageNumber = pageNum
    MapID = ms.pageRow.MapID&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 19:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/mapseries-losing-connection/m-p/1024578#M59850</guid>
      <dc:creator>EvanLafford1</dc:creator>
      <dc:date>2021-02-08T19:59:23Z</dc:date>
    </item>
  </channel>
</rss>

