<?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: Cleaning issues in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cleaning-issues/m-p/1048490#M60837</link>
    <description>&lt;P&gt;Given you haven't mentioned which application, programming language, or environment you are using... and no code examples or error messages...&lt;/P&gt;&lt;P&gt;It sounds you may be using arcpy cursors - these are best used with a "with" construct (see the help) instead of manually deleting them (with del, not arcpy.Delete_management, which is for datasets and layers).&lt;/P&gt;&lt;P&gt;It sounds like you are trying to be very complex, I suggest breaking your problem into smaller pieces, get them working, and re-build by aggregating working pieces.&lt;/P&gt;&lt;P&gt;If you are using arcpy and Pro, I have found the new Jupyter notbook functionality in Pro to be really great for getting pieces of code working.&lt;/P&gt;</description>
    <pubDate>Sun, 18 Apr 2021 03:58:45 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2021-04-18T03:58:45Z</dc:date>
    <item>
      <title>Cleaning issues</title>
      <link>https://community.esri.com/t5/python-questions/cleaning-issues/m-p/1048430#M60836</link>
      <description>&lt;P&gt;I am currently working with a&amp;nbsp;&lt;SPAN&gt;geodatabase. I have the main script and multiple functions that the script calls.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, some functions can call the same additional functions inside them.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The issue is that I have an error that my main script can not finish the process.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, each function works perfectly. Moreover, I have an issue with the last two functions in my script, so the first function from them (two last functions) will work the second won't. If I change them the first one will work no matter which one. Additionally, I can finish the process if I call the failed function but put it as the first.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have several loops, several layers and&amp;nbsp; lists.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- I deleted the cursor after each loop and layers at the end of each operation ( del and&amp;nbsp;arcpy.Delete_management).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- I deleted each list at the end of each operation (del list)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- I gave different names for the same layers or list when I called them inside of the different functions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- I updated my initial folder every time to be sure that the previous process would impact.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- I restarted my computer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I think that the same function could impact the process. Moreover, when I use the debugger I can see Python misses the lines in a loop that leads to the issue.&amp;nbsp; It happens when I call the same function that I called in the previous function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you please recommend me anything?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 13:07:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cleaning-issues/m-p/1048430#M60836</guid>
      <dc:creator>Mick</dc:creator>
      <dc:date>2021-04-17T13:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cleaning issues</title>
      <link>https://community.esri.com/t5/python-questions/cleaning-issues/m-p/1048490#M60837</link>
      <description>&lt;P&gt;Given you haven't mentioned which application, programming language, or environment you are using... and no code examples or error messages...&lt;/P&gt;&lt;P&gt;It sounds you may be using arcpy cursors - these are best used with a "with" construct (see the help) instead of manually deleting them (with del, not arcpy.Delete_management, which is for datasets and layers).&lt;/P&gt;&lt;P&gt;It sounds like you are trying to be very complex, I suggest breaking your problem into smaller pieces, get them working, and re-build by aggregating working pieces.&lt;/P&gt;&lt;P&gt;If you are using arcpy and Pro, I have found the new Jupyter notbook functionality in Pro to be really great for getting pieces of code working.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 03:58:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cleaning-issues/m-p/1048490#M60837</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-04-18T03:58:45Z</dc:date>
    </item>
  </channel>
</rss>

