<?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: FindLabel not Definied in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/findlabel-not-definied/m-p/705196#M54579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Marcin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this approach and I am still getting the same error. Not sure why it says FindLabel is not defined when it's defined in the function right off the bat.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Oct 2012 17:24:50 GMT</pubDate>
    <dc:creator>MikeMacRae</dc:creator>
    <dc:date>2012-10-26T17:24:50Z</dc:date>
    <item>
      <title>FindLabel not Definied</title>
      <link>https://community.esri.com/t5/python-questions/findlabel-not-definied/m-p/705194#M54577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to make an advanced label expression using the python parser and I keep getting the following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]18753[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def FindLabel ( [Direction] ):
&amp;nbsp; return&amp;nbsp; "{}° {}' {}\"".format( [Direction].split("-"))&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone tell me why FindLabel is not defined?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 21:35:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/findlabel-not-definied/m-p/705194#M54577</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2012-10-25T21:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: FindLabel not Definied</title>
      <link>https://community.esri.com/t5/python-questions/findlabel-not-definied/m-p/705195#M54578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I suppose that you can't use list (&lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;result of split()&lt;/SPAN&gt;&lt;SPAN&gt;) as a format() argument in this way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The format() function accepts single strings as arguments, eg. .format("50", "50", "50") &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To use specific element from a list try this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def FindLabel ( [Direction] ):
&amp;nbsp; return&amp;nbsp; "{0[0]}° {0[1]}' {0[2]}\"".format( [Direction].split("-"))&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:38:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/findlabel-not-definied/m-p/705195#M54578</guid>
      <dc:creator>MarcinGasior</dc:creator>
      <dc:date>2021-12-12T05:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: FindLabel not Definied</title>
      <link>https://community.esri.com/t5/python-questions/findlabel-not-definied/m-p/705196#M54579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Marcin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried this approach and I am still getting the same error. Not sure why it says FindLabel is not defined when it's defined in the function right off the bat.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2012 17:24:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/findlabel-not-definied/m-p/705196#M54579</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2012-10-26T17:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: FindLabel not Definied</title>
      <link>https://community.esri.com/t5/python-questions/findlabel-not-definied/m-p/705197#M54580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the issue is it doesn't like returning the field value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def FindLabel ( [Direction] ):
&amp;nbsp; var = [Direction]
&amp;nbsp; return&amp;nbsp; "{}° {}' {}\"".format(var.split("-"))&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:38:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/findlabel-not-definied/m-p/705197#M54580</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2021-12-12T05:38:30Z</dc:date>
    </item>
  </channel>
</rss>

