<?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:  AnalyzeDatasets error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/analyzedatasets-error/m-p/133420#M10404</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ListDatasets will return a None value if the workspace path is incorrect and points to a non-existent location.&amp;nbsp; Your path ends with "&lt;SPAN style="background-color: #ffffff;"&gt;ArdenArden_gsw_sde_sde" - is this missing a ".sde" extension, or perhaps the last underscore is supposed to be a period?&amp;nbsp; If you try to call arcpy.Describe() on that path, does it return a valid collection of properties or raise a runtime error?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Apr 2018 22:03:44 GMT</pubDate>
    <dc:creator>JamesMacKay3</dc:creator>
    <dc:date>2018-04-16T22:03:44Z</dc:date>
    <item>
      <title>AnalyzeDatasets error</title>
      <link>https://community.esri.com/t5/python-questions/analyzedatasets-error/m-p/133419#M10403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I pulled this script directly off the help section of my ArcGis Desktop software and I'm surprised its giving me problems.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For my SQL Server, my objective is to analyze all my feature classes contained in my five datasets but I am getting an error as follows:&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;'NoneType' object is not iterable&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank You for your assistance...Larry Adgate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Name: AnalyzeDatasets.py&lt;BR /&gt;# Description: analyzes all datasets in an enterprise geodatabase&lt;BR /&gt;# for a given user.&lt;/P&gt;&lt;P&gt;# Import system modules&lt;BR /&gt;import arcpy, os&lt;/P&gt;&lt;P&gt;# set workspace&lt;BR /&gt;# the user in this workspace must be the owner of the data to analyze.&lt;BR /&gt;workspace = "Database Connections\\ArdenArden_gsw_sde_sde"&lt;/P&gt;&lt;P&gt;# set the workspace environment&lt;BR /&gt;arcpy.env.workspace = workspace&lt;/P&gt;&lt;P&gt;# NOTE: Analyze Datasets can accept a Python list of datasets.&lt;/P&gt;&lt;P&gt;# Get a list of all the datasets the user has access to.&lt;BR /&gt;dataList = arcpy.ListFeatureClasses()&lt;/P&gt;&lt;P&gt;# Next, for feature datasets get all of the datasets and featureclasses&lt;BR /&gt;# from the list and add them to the master list.&lt;/P&gt;&lt;P&gt;#MY Error message is below:&amp;nbsp; TypeError: 'NoneType' object is not iterable&lt;BR /&gt;for dataset in arcpy.ListDatasets("*", "Feature"):&lt;BR /&gt; arcpy.env.workspace = os.path.join(workspace,dataset)&lt;BR /&gt; dataList += arcpy.ListFeatureClasses() + arcpy.ListDatasets()&lt;/P&gt;&lt;P&gt;# reset the workspace&lt;BR /&gt;arcpy.env.workspace = workspace&lt;/P&gt;&lt;P&gt;# Get the user name for the workspace&lt;BR /&gt;userName = arcpy.Describe(workspace).connectionProperties.user.lower()&lt;/P&gt;&lt;P&gt;# remove any datasets that are not owned by the connected user.&lt;BR /&gt;userDataList = [ds for ds in dataList if ds.lower().find(".%s." % userName) &amp;gt; -1]&lt;/P&gt;&lt;P&gt;# Execute analyze datasets&lt;BR /&gt;# Note: to use the "SYSTEM" option the workspace user must be an administrator.&lt;BR /&gt;arcpy.AnalyzeDatasets_management(workspace, "NO_SYSTEM", userDataList, "ANALYZE_BASE","ANALYZE_DELTA","ANALYZE_ARCHIVE")&lt;BR /&gt;print "Analyze Complete"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 21:37:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/analyzedatasets-error/m-p/133419#M10403</guid>
      <dc:creator>LarryAdgate</dc:creator>
      <dc:date>2018-04-16T21:37:40Z</dc:date>
    </item>
    <item>
      <title>Re:  AnalyzeDatasets error</title>
      <link>https://community.esri.com/t5/python-questions/analyzedatasets-error/m-p/133420#M10404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ListDatasets will return a None value if the workspace path is incorrect and points to a non-existent location.&amp;nbsp; Your path ends with "&lt;SPAN style="background-color: #ffffff;"&gt;ArdenArden_gsw_sde_sde" - is this missing a ".sde" extension, or perhaps the last underscore is supposed to be a period?&amp;nbsp; If you try to call arcpy.Describe() on that path, does it return a valid collection of properties or raise a runtime error?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 22:03:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/analyzedatasets-error/m-p/133420#M10404</guid>
      <dc:creator>JamesMacKay3</dc:creator>
      <dc:date>2018-04-16T22:03:44Z</dc:date>
    </item>
    <item>
      <title>Re:  AnalyzeDatasets error</title>
      <link>https://community.esri.com/t5/python-questions/analyzedatasets-error/m-p/133421#M10405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank You James for your help..............After correcting my workspace using your arcpy.Description() method, the script seemed have issues&amp;nbsp;opening one of the datasets.&amp;nbsp;But after removing the pipeline geometric network, &amp;nbsp;the script worked fine.....Once again thank You&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 14:56:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/analyzedatasets-error/m-p/133421#M10405</guid>
      <dc:creator>LarryAdgate</dc:creator>
      <dc:date>2018-04-17T14:56:50Z</dc:date>
    </item>
  </channel>
</rss>

