<?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 Changing the Online BA Data Source in Notebook script fails in ArcGIS Notebooks Questions</title>
    <link>https://community.esri.com/t5/arcgis-notebooks-questions/changing-the-online-ba-data-source-in-notebook/m-p/1648366#M955</link>
    <description>&lt;P&gt;I'm using a Notebook in ArcGIS Pro to run the Enrich GP tool to add demographics in several countries.&amp;nbsp; The script fails when attempting to change the data source of the environments.&amp;nbsp; A copy of the python command when running the GP shows as:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with arcpy.EnvManager(baDataSource="Online;&lt;STRONG&gt;AL&lt;/STRONG&gt;|census;"):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arcpy.analysis.Enrich("&amp;lt;Layer&amp;gt;", out_path, variables, buffer_type)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AL&lt;/STRONG&gt; is the country code which changes with each iteration.&amp;nbsp; I create a variable named "source" which looks the same as the GP output shown above.&amp;nbsp; In the script the syntax looks like:&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;with arcpy.EnvManager(source):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arcpy.analysis.Enrich("&amp;lt;Layer&amp;gt;", out_path, variables, buffer_type)&lt;/P&gt;&lt;P&gt;But when I run it, I get this error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;EnvManager.__init__() takes 1 positional argument but 2 were given&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;It appears arcpy.EnvManager () does not accept variables.&amp;nbsp; Can someone confirm this?&amp;nbsp; Is there a way to programmatically change the enrichment source country?&lt;/P&gt;</description>
    <pubDate>Thu, 11 Sep 2025 14:34:49 GMT</pubDate>
    <dc:creator>GaryChristensen63</dc:creator>
    <dc:date>2025-09-11T14:34:49Z</dc:date>
    <item>
      <title>Changing the Online BA Data Source in Notebook script fails</title>
      <link>https://community.esri.com/t5/arcgis-notebooks-questions/changing-the-online-ba-data-source-in-notebook/m-p/1648366#M955</link>
      <description>&lt;P&gt;I'm using a Notebook in ArcGIS Pro to run the Enrich GP tool to add demographics in several countries.&amp;nbsp; The script fails when attempting to change the data source of the environments.&amp;nbsp; A copy of the python command when running the GP shows as:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with arcpy.EnvManager(baDataSource="Online;&lt;STRONG&gt;AL&lt;/STRONG&gt;|census;"):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arcpy.analysis.Enrich("&amp;lt;Layer&amp;gt;", out_path, variables, buffer_type)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AL&lt;/STRONG&gt; is the country code which changes with each iteration.&amp;nbsp; I create a variable named "source" which looks the same as the GP output shown above.&amp;nbsp; In the script the syntax looks like:&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;with arcpy.EnvManager(source):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;arcpy.analysis.Enrich("&amp;lt;Layer&amp;gt;", out_path, variables, buffer_type)&lt;/P&gt;&lt;P&gt;But when I run it, I get this error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;EnvManager.__init__() takes 1 positional argument but 2 were given&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;It appears arcpy.EnvManager () does not accept variables.&amp;nbsp; Can someone confirm this?&amp;nbsp; Is there a way to programmatically change the enrichment source country?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 14:34:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-notebooks-questions/changing-the-online-ba-data-source-in-notebook/m-p/1648366#M955</guid>
      <dc:creator>GaryChristensen63</dc:creator>
      <dc:date>2025-09-11T14:34:49Z</dc:date>
    </item>
  </channel>
</rss>

