<?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: Append gives a empty string error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389283#M30776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless you specifically ask for the exception, the error message won't be displayed - that's the point of try/except:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;foo &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'a'&lt;/SPAN&gt;
bar &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; concat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; foo &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; bar
&lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt; Exception &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍

must be str&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; int‍‍‍‍‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Of course, you may have this, but we can't see your try/except statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:52:06 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2021-12-11T17:52:06Z</dc:date>
    <item>
      <title>Append gives a empty string error</title>
      <link>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389278#M30771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;had to delete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 14:32:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389278#M30771</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2018-09-07T14:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Append gives a empty string error</title>
      <link>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389279#M30772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did your code get cut off?&amp;nbsp; For one, I don't see a try statement anywhere in what you posted.&amp;nbsp; Also, there is no text below "Error is".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 16:00:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389279#M30772</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-09-07T16:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Append gives a empty string error</title>
      <link>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389280#M30773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yea just a part of the code - its 300 lines...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes the error is blank - that was the whole point of my post.&amp;nbsp; It works yet fails with error text of ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 16:50:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389280#M30773</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2018-09-07T16:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Append gives a empty string error</title>
      <link>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389281#M30774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You state the "tool trips the try statement," but I don't see any try statement in what you posted.&amp;nbsp; If the code you posted is the working code, then I suggest you post the code that generates the error if it is the error you are trying to get feedback on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 17:29:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389281#M30774</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-09-07T17:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Append gives a empty string error</title>
      <link>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389282#M30775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Umm ok I added a try.&amp;nbsp; Not sure why that matters.&amp;nbsp; I cant post all 300 lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really just asking if anyone has gotten a blank error on Append.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 17:40:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389282#M30775</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2018-09-07T17:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: Append gives a empty string error</title>
      <link>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389283#M30776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unless you specifically ask for the exception, the error message won't be displayed - that's the point of try/except:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;foo &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'a'&lt;/SPAN&gt;
bar &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; concat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; foo &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; bar
&lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt; Exception &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;e&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍

must be str&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; int‍‍‍‍‍‍‍‍&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Of course, you may have this, but we can't see your try/except statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:52:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389283#M30776</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T17:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Append gives a empty string error</title>
      <link>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389284#M30777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course, skipping the try except block reveals the same message.&lt;/P&gt;&lt;P&gt;Only use them if you know you are going to get an error message that would be thrown that isn't a python error or you want to do something else if there is an error.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;foo &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'a'&lt;/SPAN&gt;
bar &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;


concat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; foo &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; bar
Traceback &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;most recent call last&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;

&amp;nbsp; File &lt;SPAN class="string token"&gt;"&amp;lt;ipython-input-56-ef8dcb5742bb&amp;gt;"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;module&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; concat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; foo &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; bar

TypeError&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; must be str&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; int&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a better non-fail&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; concat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; foo &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; bar
&lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; concat &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"{}{}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;foo&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; bar&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 

concat
&lt;SPAN class="string token"&gt;'a1'&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;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:52:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/append-gives-a-empty-string-error/m-p/389284#M30777</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T17:52:09Z</dc:date>
    </item>
  </channel>
</rss>

