<?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: UpdateCursor no error shown in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/676000#M52345</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pedro, back to my earlier question.&amp;nbsp; How do you know the code "exits" on line 15 instead of having the code complete?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Mar 2020 15:06:16 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-03-24T15:06:16Z</dc:date>
    <item>
      <title>UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675994#M52339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gents,&lt;/P&gt;&lt;P&gt;I am using Arcmap 10.5.&lt;/P&gt;&lt;P&gt;Can someone tell me what is wrong here?&lt;/P&gt;&lt;P&gt;When it gets to line 15 it simply exits with no error and no update...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; count&lt;SPAN class="operator token"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"0"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;     &lt;SPAN class="comment token"&gt;# only feature classes with features&lt;/SPAN&gt;



                    &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"BDV"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cur &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; 
                        &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                            row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;date
                            cur&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                    
                    &lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; row


                    &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"BIN"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"*"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor_Name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; 

                        &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; prow &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor_Name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
                            
                            prow&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;NN_code
                            cursor_Name&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;prow&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

                    &lt;SPAN class="keyword token"&gt;del&lt;/SPAN&gt; prow&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:30:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675994#M52339</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2021-12-12T04:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675995#M52340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Pedro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the second parameter in your cursors, the fields will be specified with the following ["field name"].&amp;nbsp; Try updating each cursor with the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"BDV"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cur &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"BIN"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor_Name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 17:04:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675995#M52340</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2020-03-23T17:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675996#M52341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a reason you are using count as text (number inside quotes)&amp;nbsp; and not a number?&amp;nbsp; How is count being set?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; count&lt;SPAN class="operator token"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"0"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;     &lt;SPAN class="comment token"&gt;# "0" is a text string&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# vs&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; count &lt;SPAN class="operator token"&gt;&amp;lt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;#  &amp;gt;0  assuming negative numbers wouldn't happen&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# or&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; count&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; ‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:30:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675996#M52341</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-12T04:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675997#M52342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although the OP's syntax around field names is awkward, it will work.&amp;nbsp; If there is only a single field for the cursor, it can be passed as a string, i.e., it doesn't have to be in a list, which is what the OP is doing here.&amp;nbsp; The parentheses around the text in the OP's code serve no purpose because they are not making a tuple (for a tuple, one would have to put a comma after the item).&amp;nbsp; That said, the sequence of field names can be passed as a tuple, it just isn't idiomatic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the random asterisk for the SQL WHERE clause will work, but again is not idiomatic to ArcPy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although the OP's code will work, its uncommon structure gives the impression it works as much by chance as on purpose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 22:32:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675997#M52342</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-23T22:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675998#M52343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;When it gets to line 15 it simply exits with no error and no update..&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;How do you know it is exiting and not completing the code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 22:43:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675998#M52343</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-23T22:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675999#M52344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua,&lt;/P&gt;&lt;P&gt;I understand for a programmer this looks very messy... but I am not a programmer and I never had lessons on it. I just have a need and I have seen python as a solution and I try it. Sometimes works sometimes not, sometimes I got blocked for days with very simple things such as "tab" in the wrong location.&lt;/P&gt;&lt;P&gt;For this case, I just want to do a button to be used in arcmap that populates a field with a user input date and update another field with the name of the mxd. For the moment&amp;nbsp;I will see how to create buttons for this stuff.&lt;/P&gt;&lt;P&gt;Any suggestion is welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;P&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 11:35:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/675999#M52344</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-03-24T11:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/676000#M52345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pedro, back to my earlier question.&amp;nbsp; How do you know the code "exits" on line 15 instead of having the code complete?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 15:06:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/676000#M52345</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-24T15:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/676001#M52346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the data was nothing written...&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 15:32:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/676001#M52346</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-03-24T15:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/676002#M52347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pedro, you marked Jake's comment as Correct, so the code is working now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 19:25:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/676002#M52347</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-24T19:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: UpdateCursor no error shown</title>
      <link>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/676003#M52348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it is! I am now trying to do the Add-in... which is not working already.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyway thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2020 09:13:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/updatecursor-no-error-shown/m-p/676003#M52348</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-03-25T09:13:52Z</dc:date>
    </item>
  </channel>
</rss>

