<?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: Summarize within -- ModuleNotFoundError: No module named 'common' in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1386963#M69962</link>
    <description>&lt;P&gt;Also, if ESRI is listening, the “majority” percentage is returning values greater than 100% (by float: I’m getting 100.00000003).&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 19:25:55 GMT</pubDate>
    <dc:creator>JMarcel192</dc:creator>
    <dc:date>2024-02-26T19:25:55Z</dc:date>
    <item>
      <title>Summarize within -- ModuleNotFoundError: No module named 'common'</title>
      <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1378876#M69797</link>
      <description>&lt;P&gt;Been running into this issue for a while now, and previously I just did a big multi step work around, but now it is just getting annoying to have to keep doing that within the code.&amp;nbsp; I simply get this error:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;Traceback (most recent call last):
  File "C:\Users\USERNAME\GIS Share Drive\_Resources\Toolboxes\Toolbox.atbx\ToolName.tool\tool.script.execute.py", line 26, in &amp;lt;module&amp;gt;
ModuleNotFoundError: No module named 'common'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Here is the portion of the code we get hung up on:&lt;/P&gt;&lt;PRE&gt; # Process: Summarize Within (Summarize Within) (analysis)&lt;BR /&gt;arcpy.AddMessage(f"Generate crop history summary table.")&lt;BR /&gt;Crop_Summary = f"{OutputLocation}\\Crop_{Year}_Summary"&lt;BR /&gt;Class_Names_Summary = f"{OutputLocation}\\Crop_{Year}_Class_Names_Summary"&lt;BR /&gt;arcpy.analysis.SummarizeWithin(in_polygons=Field_Boundary,&lt;BR /&gt;in_sum_features=Crop_poly,&lt;BR /&gt;out_feature_class=Crop_Summary,&lt;BR /&gt;keep_all_polygons="KEEP_ALL",&lt;BR /&gt;sum_fields=[['gridcode','SUM']],&lt;BR /&gt;sum_shape="ADD_SHAPE_SUM",&lt;BR /&gt;shape_unit="ACRES",&lt;BR /&gt;group_field="Class_Names",&lt;BR /&gt;add_min_maj="ADD_MIN_MAJ",&lt;BR /&gt;add_group_percent="ADD_PERCENT",&lt;BR /&gt;out_group_table=Class_Names_Summary)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have reviewed all out output locations, types, and inputs and everything works as expected when running those through the tool in the traditional GUI.&amp;nbsp; However, since this is just 1 step in a larger process we want it in our custom script tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be MUCH appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 21:43:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1378876#M69797</guid>
      <dc:creator>MeganEngel</dc:creator>
      <dc:date>2024-02-06T21:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize within -- ModuleNotFoundError: No module named 'common'</title>
      <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1378912#M69798</link>
      <description>&lt;P&gt;Where are the imports?&lt;/P&gt;&lt;P&gt;Are you running your toolbox from a local install or elsewhere?&lt;/P&gt;&lt;P&gt;There are probably dozens of "common" folders and "common.py" modules with the arcgis pro installation path, so it might be an import that you aren't expecting (in creating the tool/toolbox perhaps) that is doing the import)&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 22:44:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1378912#M69798</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-02-06T22:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize within -- ModuleNotFoundError: No module named 'common'</title>
      <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1379077#M69799</link>
      <description>&lt;P&gt;We are running this on a local install.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the Imports in our custom script:&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;import os&lt;BR /&gt;import time&lt;BR /&gt;import subprocess&lt;BR /&gt;import datetime&lt;BR /&gt;import getpass&lt;BR /&gt;import csv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is important to note this error started happing after we updated ArcPro to 3.2 from 3.1.&amp;nbsp; We've also tried the classic uninstall and reinstall in case there was an error there.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 14:57:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1379077#M69799</guid>
      <dc:creator>MeganEngel</dc:creator>
      <dc:date>2024-02-07T14:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize within -- ModuleNotFoundError: No module named 'common'</title>
      <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1379197#M69801</link>
      <description>&lt;P&gt;I would report it to Tech Support if it worked fine in 3.1 and is now a bug in 3.2&lt;/P&gt;&lt;P&gt;They have more resources to identify conflicts in package imports and related issues.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 16:54:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1379197#M69801</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2024-02-07T16:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize within -- ModuleNotFoundError: No module named 'common'</title>
      <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1386956#M69961</link>
      <description>&lt;P&gt;So ESRI decided to move, downgrade the tool (by numeric summary) and reintroduced the tool through their “Geoanalytics Desktop Tool” using Apache Spark, the tools library is under “arcpy.gapro.SummarizeWithin(“ and has a reference website. It has a completely new schema, similar conclusions, more powerful capabilities, and giving me some weird, inconsistent outputs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Hope that helps&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 19:29:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1386956#M69961</guid>
      <dc:creator>JMarcel192</dc:creator>
      <dc:date>2024-02-26T19:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize within -- ModuleNotFoundError: No module named 'common'</title>
      <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1386963#M69962</link>
      <description>&lt;P&gt;Also, if ESRI is listening, the “majority” percentage is returning values greater than 100% (by float: I’m getting 100.00000003).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 19:25:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1386963#M69962</guid>
      <dc:creator>JMarcel192</dc:creator>
      <dc:date>2024-02-26T19:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize within -- ModuleNotFoundError: No module named 'common'</title>
      <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1405846#M70258</link>
      <description>&lt;P&gt;I am running into the same problem. I teach Python at Fanshawe College and everything works on the lab computers which are running ArcGIS Pro 3.1.3, but not on laptops that are upgraded to 3.2.2. Also important to note, the SummarizeWithin from Analysis toolbox works fine in model builder, fine in Jupyter, but not when integrating into a Script tool. Just doesn't make any sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 16:07:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1405846#M70258</guid>
      <dc:creator>aclark2_fanshawe</dc:creator>
      <dc:date>2024-04-04T16:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize within -- ModuleNotFoundError: No module named 'common'</title>
      <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1424009#M70552</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/626735"&gt;@aclark2_fanshawe&lt;/a&gt;, I had been working with ESRI for a while on this ticket and we could not figure out why it wasn't workin' in the script tool.&amp;nbsp; They were able to run it no problem on multiple machines with the same software version etc.&amp;nbsp; Same thing we found, I can run it in python, jupyter, model builder, and the model builder GUI, just not a script tool GUI. SO ODD!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final resolution for my organization was to just run it all in python/&lt;SPAN&gt;Jupyter, because the script was short enough.&amp;nbsp; For our more complex script it had been in before, I just ended up re-writing a bunch of stuff taking a single step to 5 steps to get the result.&amp;nbsp; Not ideal&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 17:58:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1424009#M70552</guid>
      <dc:creator>MeganEngel</dc:creator>
      <dc:date>2024-05-09T17:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize within -- ModuleNotFoundError: No module named 'common'</title>
      <link>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1543197#M72949</link>
      <description>&lt;P&gt;Did you ever resolve this issue? I'm having the same problem now. It could have something to do with me moving the tool onto my work's NAS but it was working perfectly fine as is yesterday so I'm not sure. I kind of tried&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/542660"&gt;@JMarcel192&lt;/a&gt;'s solution and tried using arcpy.geoanalytics.SummarizeWithin but that gave me an "Unable to get GeoAnalytics URL" error even though the GeoAnalytics Desktop tool works perfectly fine in ArcGIS Pro.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 19:44:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/summarize-within-modulenotfounderror-no-module/m-p/1543197#M72949</guid>
      <dc:creator>jacob_ekn</dc:creator>
      <dc:date>2024-09-26T19:44:10Z</dc:date>
    </item>
  </channel>
</rss>

