<?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: Failure to package project with a toolbox in pro in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001690#M34304</link>
    <description>&lt;P&gt;Essentially, in my project folder I have an input folder with shapefiles of&amp;nbsp; (A) species distribution records (points) which I need to 'intersect' and spatially join with a &lt;U&gt;large&lt;/U&gt; multipolygon shapefile stored within the project GDB (B). The output (the specific polygons from B which contain points from A) are then saved in a n output folder within the project folder. The toolbox I created with modelbuilder does this for me but when I try saving the project as a package the error as listed in my OP pops up. Below is the code from my model that I exported to python window (I see that Iterators are unwelcome in Python, perhaps that is the syntax error that is coming up?):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;PS. Thank you vey much for your help, it is hugely appreciated!&lt;/P&gt;&lt;P&gt;# -*- coding: utf-8 -*-&lt;BR /&gt;"""&lt;BR /&gt;Generated by ArcGIS ModelBuilder on : 2020-11-16 13:04:46&lt;BR /&gt;"""&lt;BR /&gt;import arcpy&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;def FeatureClassGenerator(workspace, wild_card, feature_type, recursive) :&lt;BR /&gt;with arcpy.EnvManager(workspace = workspace):&lt;/P&gt;&lt;P&gt;dataset_list = [""]&lt;BR /&gt;if recursive:&lt;BR /&gt;datasets = arcpy.ListDatasets()&lt;BR /&gt;dataset_list.extend(datasets)&lt;/P&gt;&lt;P&gt;for dataset in dataset_list:&lt;BR /&gt;featureclasses = arcpy.ListFeatureClasses(wild_card, feature_type, dataset)&lt;BR /&gt;for fc in featureclasses:&lt;BR /&gt;yield os.path.join(workspace, dataset, fc), fc&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;def Model(): # Segment Processing&lt;/P&gt;&lt;P&gt;# To allow overwriting outputs change overwriteOutput option to True.&lt;BR /&gt;arcpy.env.overwriteOutput = False&lt;/P&gt;&lt;P&gt;Fixed_Segments_5_ = "C:\\GIS\\Seg_Processing_ARCPRO\\Seg_Processing_ARCPRO.gdb\\Fixed_Segments"&lt;BR /&gt;Input_Species_For_Processing = "C:\\GIS\\Seg_Processing_ARCPRO\\Input\\Input_Species_For_Processing"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for FeatureClass, Name in FeatureClassGenerator(Input_Species_For_Processing, "*.shp", "POINT", "RECURSIVE"):&lt;/P&gt;&lt;P&gt;# Process: Select Layer By Location (Select Layer By Location) (management)&lt;BR /&gt;Fixed_Segments_Layer, Output_Layer_Names, Count = arcpy.management.SelectLayerByLocation(in_layer=[Fixed_Segments_5_], overlap_type="CONTAINS", select_features=FeatureClass, search_distance="", selection_type="NEW_SELECTION", invert_spatial_relationship="NOT_INVERT")&lt;/P&gt;&lt;P&gt;# Process: Spatial Join (Spatial Join) (analysis)&lt;BR /&gt;Name = "FeatureClass"&lt;BR /&gt;_Name_shp = fr"C:\GIS\Seg_Processing_ARCPRO\Output\{Name}.shp"&lt;BR /&gt;arcpy.analysis.SpatialJoin(target_features=Fixed_Segments_Layer, join_features=FeatureClass, out_feature_class=_Name_shp, join_operation="JOIN_ONE_TO_ONE", join_type="KEEP_ALL", field_mapping="fid_1 \"fid_1\" true true false 8 Double 0 0,First,#,Fixed_Segments_Layer,fid_1,-1,-1;cat \"cat\" true true false 4 Long 0 0,First,#,Fixed_Segments_Layer,cat,-1,-1;ogc_fid \"ogc_fid\" true true false 4 Long 0 0,First,#,Fixed_Segments_Layer,ogc_fid,-1,-1;area \"area\" true true false 8 Double 0 0,First,#,Fixed_Segments_Layer,area,-1,-1;region \"region\" true true false 254 Text 0 0,First,#,Fixed_Segments_Layer,region,0,254;Natural_me \"Natural_me\" true true false 8 Double 0 0,First,#,Fixed_Segments_Layer,Natural_me,-1,-1;layer \"layer\" true true false 100 Text 0 0,First,#,Fixed_Segments_Layer,layer,0,100;path \"path\" true true false 200 Text 0 0,First,#,Fixed_Segments_Layer,path,0,200;Shape_Leng \"Shape_Length\" false true true 8 Double 0 0,First,#,Fixed_Segments_Layer,Shape_Length,-1,-1;Shape_Area \"Shape_Area\" false true true 8 Double 0 0,First,#,Fixed_Segments_Layer,Shape_Area,-1,-1", match_option="INTERSECT", search_radius="", distance_field_name="")&lt;/P&gt;&lt;P&gt;if __name__ == '__main__':&lt;BR /&gt;# Global Environment settings&lt;BR /&gt;with arcpy.EnvManager(scratchWorkspace=r"C:\GIS\Seg_Processing_ARCPRO\Seg_Processing_ARCPRO.gdb", workspace=r"C:\GIS\Seg_Processing_ARCPRO\Seg_Processing_ARCPRO.gdb"):&lt;BR /&gt;Model()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Nov 2020 11:20:54 GMT</pubDate>
    <dc:creator>OliverCowan</dc:creator>
    <dc:date>2020-11-16T11:20:54Z</dc:date>
    <item>
      <title>Failure to package project with a toolbox in pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001669#M34299</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;My attempts to package my project keep failing with the error code&amp;nbsp;tatus: "Failed ErrorMessage: ERROR 001659: Consolidating toolbox C:\GIS\Seg_Processing_ARCPRO\Seg_Processing_ARCPRO.tbx"&lt;/P&gt;&lt;P&gt;&amp;nbsp;The model works fine when I run it; however it includes and Iterator. I'm aware that the Iterator function is strictly a model tool and does not translate to python script.&amp;nbsp; Could this be the reason for the failure to package my project?&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 08:08:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001669#M34299</guid>
      <dc:creator>OliverCowan</dc:creator>
      <dc:date>2020-11-16T08:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Failure to package project with a toolbox in pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001682#M34301</link>
      <description>&lt;P&gt;The error...&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-01651-01675-001659.htm" target="_self"&gt;001659: Consolidating toolbox &amp;lt;value&amp;gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;has a suggestion.&amp;nbsp; Did you get the report from&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/analyzetoolsforpro.htm" target="_self"&gt;Analyze Tools For Pro (Data Management)&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 10:05:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001682#M34301</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-11-16T10:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Failure to package project with a toolbox in pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001686#M34302</link>
      <description>&lt;P&gt;Thanks for the feedback. I ran the Analyze Tools For Pro and received the below...&lt;/P&gt;&lt;P&gt;"ERROR 000989: Python syntax error: within script C:\GIS\Seg_Processing_ARCPRO\Seg_Processing_ARCPRO.aprx&lt;BR /&gt;Failed to execute (AnalyzeToolsForPro)."&lt;/P&gt;&lt;P&gt;Do you know if it is possible to isolate where exactly the syntax error is occurring?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 10:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001686#M34302</guid>
      <dc:creator>OliverCowan</dc:creator>
      <dc:date>2020-11-16T10:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Failure to package project with a toolbox in pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001687#M34303</link>
      <description>&lt;P&gt;Have you opened the script up in a python IDE to check for syntax errors?&lt;/P&gt;&lt;P&gt;If it is a model, then try&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/modelbuilder/exporting-a-model-to-python.htm" target="_self"&gt;exporting-a-model-to-python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it is relatively short, you can post a copy of the code here&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 10:51:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001687#M34303</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-11-16T10:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Failure to package project with a toolbox in pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001690#M34304</link>
      <description>&lt;P&gt;Essentially, in my project folder I have an input folder with shapefiles of&amp;nbsp; (A) species distribution records (points) which I need to 'intersect' and spatially join with a &lt;U&gt;large&lt;/U&gt; multipolygon shapefile stored within the project GDB (B). The output (the specific polygons from B which contain points from A) are then saved in a n output folder within the project folder. The toolbox I created with modelbuilder does this for me but when I try saving the project as a package the error as listed in my OP pops up. Below is the code from my model that I exported to python window (I see that Iterators are unwelcome in Python, perhaps that is the syntax error that is coming up?):&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;PS. Thank you vey much for your help, it is hugely appreciated!&lt;/P&gt;&lt;P&gt;# -*- coding: utf-8 -*-&lt;BR /&gt;"""&lt;BR /&gt;Generated by ArcGIS ModelBuilder on : 2020-11-16 13:04:46&lt;BR /&gt;"""&lt;BR /&gt;import arcpy&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;def FeatureClassGenerator(workspace, wild_card, feature_type, recursive) :&lt;BR /&gt;with arcpy.EnvManager(workspace = workspace):&lt;/P&gt;&lt;P&gt;dataset_list = [""]&lt;BR /&gt;if recursive:&lt;BR /&gt;datasets = arcpy.ListDatasets()&lt;BR /&gt;dataset_list.extend(datasets)&lt;/P&gt;&lt;P&gt;for dataset in dataset_list:&lt;BR /&gt;featureclasses = arcpy.ListFeatureClasses(wild_card, feature_type, dataset)&lt;BR /&gt;for fc in featureclasses:&lt;BR /&gt;yield os.path.join(workspace, dataset, fc), fc&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;def Model(): # Segment Processing&lt;/P&gt;&lt;P&gt;# To allow overwriting outputs change overwriteOutput option to True.&lt;BR /&gt;arcpy.env.overwriteOutput = False&lt;/P&gt;&lt;P&gt;Fixed_Segments_5_ = "C:\\GIS\\Seg_Processing_ARCPRO\\Seg_Processing_ARCPRO.gdb\\Fixed_Segments"&lt;BR /&gt;Input_Species_For_Processing = "C:\\GIS\\Seg_Processing_ARCPRO\\Input\\Input_Species_For_Processing"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for FeatureClass, Name in FeatureClassGenerator(Input_Species_For_Processing, "*.shp", "POINT", "RECURSIVE"):&lt;/P&gt;&lt;P&gt;# Process: Select Layer By Location (Select Layer By Location) (management)&lt;BR /&gt;Fixed_Segments_Layer, Output_Layer_Names, Count = arcpy.management.SelectLayerByLocation(in_layer=[Fixed_Segments_5_], overlap_type="CONTAINS", select_features=FeatureClass, search_distance="", selection_type="NEW_SELECTION", invert_spatial_relationship="NOT_INVERT")&lt;/P&gt;&lt;P&gt;# Process: Spatial Join (Spatial Join) (analysis)&lt;BR /&gt;Name = "FeatureClass"&lt;BR /&gt;_Name_shp = fr"C:\GIS\Seg_Processing_ARCPRO\Output\{Name}.shp"&lt;BR /&gt;arcpy.analysis.SpatialJoin(target_features=Fixed_Segments_Layer, join_features=FeatureClass, out_feature_class=_Name_shp, join_operation="JOIN_ONE_TO_ONE", join_type="KEEP_ALL", field_mapping="fid_1 \"fid_1\" true true false 8 Double 0 0,First,#,Fixed_Segments_Layer,fid_1,-1,-1;cat \"cat\" true true false 4 Long 0 0,First,#,Fixed_Segments_Layer,cat,-1,-1;ogc_fid \"ogc_fid\" true true false 4 Long 0 0,First,#,Fixed_Segments_Layer,ogc_fid,-1,-1;area \"area\" true true false 8 Double 0 0,First,#,Fixed_Segments_Layer,area,-1,-1;region \"region\" true true false 254 Text 0 0,First,#,Fixed_Segments_Layer,region,0,254;Natural_me \"Natural_me\" true true false 8 Double 0 0,First,#,Fixed_Segments_Layer,Natural_me,-1,-1;layer \"layer\" true true false 100 Text 0 0,First,#,Fixed_Segments_Layer,layer,0,100;path \"path\" true true false 200 Text 0 0,First,#,Fixed_Segments_Layer,path,0,200;Shape_Leng \"Shape_Length\" false true true 8 Double 0 0,First,#,Fixed_Segments_Layer,Shape_Length,-1,-1;Shape_Area \"Shape_Area\" false true true 8 Double 0 0,First,#,Fixed_Segments_Layer,Shape_Area,-1,-1", match_option="INTERSECT", search_radius="", distance_field_name="")&lt;/P&gt;&lt;P&gt;if __name__ == '__main__':&lt;BR /&gt;# Global Environment settings&lt;BR /&gt;with arcpy.EnvManager(scratchWorkspace=r"C:\GIS\Seg_Processing_ARCPRO\Seg_Processing_ARCPRO.gdb", workspace=r"C:\GIS\Seg_Processing_ARCPRO\Seg_Processing_ARCPRO.gdb"):&lt;BR /&gt;Model()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 11:20:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001690#M34304</guid>
      <dc:creator>OliverCowan</dc:creator>
      <dc:date>2020-11-16T11:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Failure to package project with a toolbox in pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001693#M34305</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/416334"&gt;@OliverCowan&lt;/a&gt;&amp;nbsp;you forgot to past within code blocks.&lt;/P&gt;&lt;P&gt;Click on the 3 dots,&amp;nbsp;&lt;STRONG&gt;...&lt;/STRONG&gt;&amp;nbsp;, then select the &lt;STRONG&gt;&amp;lt;/&amp;gt;&lt;/STRONG&gt;&amp;nbsp;, then select &lt;STRONG&gt;Python&lt;/STRONG&gt; and insert your code to get it formatted. as in this example from your code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# To allow overwriting outputs change overwriteOutput option to True.
arcpy.env.overwriteOutput = False&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which begs the question... do you want to overwrite outputs? or not.&lt;/P&gt;&lt;P&gt;Are all your data locateable?&lt;/P&gt;&lt;P&gt;On a quick look, I can't see where &lt;STRONG&gt;if recursive&lt;/STRONG&gt; is set&lt;/P&gt;&lt;P&gt;Did you run the compatability check I suggested?&lt;/P&gt;&lt;P&gt;,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 12:37:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001693#M34305</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-11-16T12:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Failure to package project with a toolbox in pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001705#M34306</link>
      <description>&lt;LI-CODE lang="python"&gt;# -*- coding: utf-8 -*-
"""
Generated by ArcGIS ModelBuilder on : 2020-11-16 13:04:46
"""
import arcpy
import os

def FeatureClassGenerator(workspace, wild_card, feature_type, recursive) :
  with arcpy.EnvManager(workspace = workspace):

    dataset_list = [""]
    if recursive:
      datasets = arcpy.ListDatasets()
      dataset_list.extend(datasets)

    for dataset in dataset_list:
      featureclasses = arcpy.ListFeatureClasses(wild_card, feature_type, dataset)
      for fc in featureclasses:
        yield os.path.join(workspace, dataset, fc), fc


def Model():  # Segment Processing

    # To allow overwriting outputs change overwriteOutput option to True.
    arcpy.env.overwriteOutput = True

    Fixed_Segments_5_ = "C:\\GIS\\Seg_Processing_ARCPRO\\Seg_Processing_ARCPRO.gdb\\Fixed_Segments"
    Input_Species_For_Processing = "C:\\GIS\\Seg_Processing_ARCPRO\\Input\\Input_Species_For_Processing"
   

    for FeatureClass, Name in FeatureClassGenerator(Input_Species_For_Processing, "*.shp", "POINT", "RECURSIVE"):

        # Process: Select Layer By Location (Select Layer By Location) (management)
        Fixed_Segments_Layer, Output_Layer_Names, Count = arcpy.management.SelectLayerByLocation(in_layer=[Fixed_Segments_5_], overlap_type="CONTAINS", select_features=FeatureClass, search_distance="", selection_type="NEW_SELECTION", invert_spatial_relationship="NOT_INVERT")

        # Process: Spatial Join (Spatial Join) (analysis)
        Name = "FeatureClass"
        _Name_shp = fr"C:\GIS\Seg_Processing_ARCPRO\Output\{Name}.shp"
        arcpy.analysis.SpatialJoin(target_features=Fixed_Segments_Layer, join_features=FeatureClass, out_feature_class=_Name_shp, join_operation="JOIN_ONE_TO_ONE", join_type="KEEP_ALL", field_mapping="fid_1 \"fid_1\" true true false 8 Double 0 0,First,#,Fixed_Segments_Layer,fid_1,-1,-1;cat \"cat\" true true false 4 Long 0 0,First,#,Fixed_Segments_Layer,cat,-1,-1;ogc_fid \"ogc_fid\" true true false 4 Long 0 0,First,#,Fixed_Segments_Layer,ogc_fid,-1,-1;area \"area\" true true false 8 Double 0 0,First,#,Fixed_Segments_Layer,area,-1,-1;region \"region\" true true false 254 Text 0 0,First,#,Fixed_Segments_Layer,region,0,254;Natural_me \"Natural_me\" true true false 8 Double 0 0,First,#,Fixed_Segments_Layer,Natural_me,-1,-1;layer \"layer\" true true false 100 Text 0 0,First,#,Fixed_Segments_Layer,layer,0,100;path \"path\" true true false 200 Text 0 0,First,#,Fixed_Segments_Layer,path,0,200;Shape_Leng \"Shape_Length\" false true true 8 Double 0 0,First,#,Fixed_Segments_Layer,Shape_Length,-1,-1;Shape_Area \"Shape_Area\" false true true 8 Double 0 0,First,#,Fixed_Segments_Layer,Shape_Area,-1,-1", match_option="INTERSECT", search_radius="", distance_field_name="")

if __name__ == '__main__':
    # Global Environment settings
    with arcpy.EnvManager(scratchWorkspace=r"C:\GIS\Seg_Processing_ARCPRO\Seg_Processing_ARCPRO.gdb", workspace=r"C:\GIS\Seg_Processing_ARCPRO\Seg_Processing_ARCPRO.gdb"):
        Model()
&lt;/LI-CODE&gt;&lt;P&gt;my apologies-have amended above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;wrt to overwriting outputs at this stage it doesn't really matter but I have changed it to "=True".&lt;/P&gt;&lt;P&gt;Data should be locatable - the input shapefiles are within folders in the project folder.&lt;/P&gt;&lt;P&gt;The compatibility check reported a syntax error in script...&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 13:01:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001705#M34306</guid>
      <dc:creator>OliverCowan</dc:creator>
      <dc:date>2020-11-16T13:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Failure to package project with a toolbox in pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001708#M34307</link>
      <description>&lt;LI-CODE lang="python"&gt;for FeatureClass, Name in FeatureClassGenerator(Input_Species_For_Processing, "*.shp", "POINT", "RECURSIVE"):&lt;/LI-CODE&gt;&lt;P&gt;Is suspect you need to replace "RECURSIVE" with &lt;STRONG&gt;True&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;because this code section won't work since it is looking for a boolean&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    dataset_list = [""]
    if recursive:
      datasets = arcpy.ListDatasets()
      dataset_list.extend(datasets)&lt;/LI-CODE&gt;&lt;P&gt;and this block won't run at all since dataset_list is empty&lt;/P&gt;&lt;LI-CODE lang="python"&gt;    for dataset in dataset_list:
      featureclasses = arcpy.ListFeatureClasses(wild_card, feature_type, dataset)
      for fc in featureclasses:
        yield os.path.join(workspace, dataset, fc), fc&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 16 Nov 2020 13:16:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/failure-to-package-project-with-a-toolbox-in-pro/m-p/1001708#M34307</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-11-16T13:16:07Z</dc:date>
    </item>
  </channel>
</rss>

