<?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: How do i represent the degree (°) &amp;amp; Minute (') symbols in my Python Script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277986#M21468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Why not simply go ascii on it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;replace &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp; "°" &amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;with &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp;&amp;nbsp; chr(186) &amp;amp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;186 = º&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or you may have to go &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;amp; chr(0186) &amp;amp;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Oct 2013 17:32:30 GMT</pubDate>
    <dc:creator>RobertBorchert</dc:creator>
    <dc:date>2013-10-02T17:32:30Z</dc:date>
    <item>
      <title>How do i represent the degree (&amp;deg;) &amp;amp;amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277966#M21448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried to populate a field by using the line below in my script but I got the error message below. Please how can I represent the degree (°) &amp;amp; Minute (') symbols in my Python Script. Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear",'[NUM1] &amp;amp; "°" &amp;amp; [NUM2]',"VB") File "C:\Users\Administrator\AppData\Local\ESRI\Desktop10.1\AssemblyCache\{7F12A0CE-D617-8330-5EBC-E045415D9345}\PlanTool_addin.py", line 105 SyntaxError: Non-ASCII character '\xb0'&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 00:43:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277966#M21448</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2013-10-02T00:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277967#M21449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear",str[NUM1] + '\xb0' + str[NUM2] + "'","PYTHON 9.3")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I tried to populate a field by using the line below in my script but I got the error message below. Please how can I represent the degree (°) &amp;amp; Minute (') symbols in my Python Script. Any suggestions?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear",'[NUM1] &amp;amp; "°" &amp;amp; [NUM2]',"VB")
File "C:\Users\Administrator\AppData\Local\ESRI\Desktop10.1\AssemblyCache\{7F12A0CE-D617-8330-5EBC-E045415D9345}\PlanTool_addin.py", line 105 SyntaxError: Non-ASCII character '\xb0'&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:31:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277967#M21449</guid>
      <dc:creator>ChrisPedrezuela</dc:creator>
      <dc:date>2021-12-11T13:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277968#M21450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried your suggestion and this was what I got below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Traceback (most recent call last):
&amp;nbsp; File "C:\Users\Administrator\AppData\Local\ESRI\Desktop10.1\AssemblyCache\{7F12A0CE-D617-8330-5EBC-E045415D9345}\PlanTool_addin.py", line 105, in onSelChange arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear",str[NUM1] + '\xb0' + str[NUM2] + "'","PYTHON 9.3")
NameError: global name 'NUM1' is not defined&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:31:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277968#M21450</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2021-12-11T13:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277969#M21451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;try:&lt;BR /&gt;arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear",str([NUM1]) + '\xb0' + str([NUM2]) + "'","PYTHON 9.3")&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;He forgot the parentheses for the str method.&amp;nbsp; Above revision should work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 12:17:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277969#M21451</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-10-02T12:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277970#M21452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another error message&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear",str([NUM1]) + '\xb0' + str([NUM2]) + "'","PYTHON 9.3")
Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
NameError: name 'NUM1' is not defined&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:31:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277970#M21452</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2021-12-11T13:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277971#M21453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Minor omission, I think you forgot the preceding quote on the expression -- that was drilled into me yesterday as I was forgetting it over and over again...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"'" + str([NUM1]) + '\xb0' + str([NUM2]) + "'"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 14:20:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277971#M21453</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-10-02T14:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277972#M21454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Still the same error message&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;("GISMainFabric_Line_Clip_0","Bear","'" + str([NUM1]) + '\xb0' + str([NUM2]) + "'" ,"PYTHON 9.3")
Runtime error 
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
NameError: name 'NUM1' is not defined&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:31:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277972#M21454</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2021-12-11T13:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277973#M21455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;...uh, one more thing, I'm not sure but since it is a Python expression do you need the field delimiters (exclamation points) as shown?:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"'" + str(!NUM1!) + '\xb0' + str(!NUM2!) + "'"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 14:37:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277973#M21455</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-10-02T14:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277974#M21456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK, finally...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;exp = 'str(!NUM1!) + \'\xb0\'' + str(!NUM2!)'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear", exp,"PYTHON 9.3")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...to further explain the expression (exp) I think denoting the fields with ! is pretty much self-explanatory - escaping the inner quotes was a little tricky.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to pass \xb0 for the degree symbol but you need to concatenate this inner string with the 2 outer field values (converted to string of course).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But you need to pass the quote as a quote, not to denote the end of the expression component, so \' does that... the outer one \'' interprets the 1st single quote as part of the string and the 2nd single quote denotes the end of the middle component - if in doubt, define exp as I have done above, and print it out...if say NUM1 equals 25 and NUM2 equals 50 (and let's just say the asterisk is the deg symbol - I forgot if this txt editor will properly interpret a deg symbol), then should be interpeted as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;25*50&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...let's just say further that you'd like some 'whitespace' after the symbol, then in similar fashion do something like this, adding :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;exp = 'str(!NUM1!) + \'\xb0&amp;nbsp; \'' + str(!NUM2!)'&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 15:00:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277974#M21456</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-10-02T15:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277975#M21457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Im afraid this is what I got&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;exp = 'str(!NUM1!) + \'\xb0\'' + str(!NUM2!)'
Parsing error SyntaxError: invalid syntax (line 1)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:31:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277975#M21457</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2021-12-11T13:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277976#M21458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Whole expression has to evaluate to a string. It's still thinking the fields in the expressions are variables. Try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;exp = 'str(!NUM1!) + "\xb0" + str(!NUM2!)'
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;screenshot:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]27969[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:31:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277976#M21458</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2021-12-11T13:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277977#M21459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, but this is what I got:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;exp = 'str(!NUM1!) + "\xb0" + str(!NUM2!)'
&amp;gt;&amp;gt;&amp;gt; arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear", exp,"PYTHON 9.3")
... 
Runtime error&amp;nbsp; Traceback (most recent call last):&amp;nbsp;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&amp;nbsp;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 3128, in CalculateField&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000800: The value is not a member of VB | PYTHON | PYTHON_9.3. Failed to execute (CalculateField).&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:31:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277977#M21459</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2021-12-11T13:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277978#M21460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks, but this is what I got:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;exp = 'str(!NUM1!) + "\xb0" + str(!NUM2!)'
&amp;gt;&amp;gt;&amp;gt; arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear", exp,"PYTHON 9.3")
... 
Runtime error&amp;nbsp; Traceback (most recent call last):&amp;nbsp;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;&amp;nbsp;&amp;nbsp; File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 3128, in CalculateField&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000800: The value is not a member of VB | PYTHON | PYTHON_9.3. Failed to execute (CalculateField).&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Well this one you should be figuring out, since it tells you in the error what the problem is this time.&amp;nbsp; You missed the underscore in "PYTHON_9.3" (You wrote "PYTHON 9.3")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;exp = 'str(!NUM1!) + "\xb0" + str(!NUM2!)'
arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear", exp,"PYTHON_9.3")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want a space between the numbers and the minutes symbol after the second number, the expression should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;exp = 'str(!NUM1!) + "\xb0 " + str(!NUM2!) + "'"'&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:32:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277978#M21460</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-11T13:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277979#M21461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try "PYTHON_9.3" instead of "PYTHON 9.3"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 16:22:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277979#M21461</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2013-10-02T16:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277980#M21462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Well this one you should be figuring out, since it tells you in the error what the problem is this time.&amp;nbsp; You missed the underscore in "PYTHON_9.3" (You wrote "PYTHON 9.3")&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;exp = 'str(!NUM1!) + "\xb0" + str(!NUM2!)'
arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear", exp,"PYTHON_9.3")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;If you want a space between the numbers and the minutes symbol after the second number, the expression should be:&lt;BR /&gt;&lt;BR /&gt;exp = 'str(!NUM1!) + "\xb0 " + str(!NUM2!) + "'"'&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This error below was what I got when I tried your suggestion,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; exp = 'str(!NUM1!) + "\xb0 " + str(!NUM2!) + "'"' 
Parsing error SyntaxError: EOL while scanning string literal (line 1)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:32:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277980#M21462</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2021-12-11T13:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277981#M21463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Well this one you should be figuring out, since it tells you in the error what the problem is this time.&amp;nbsp; You missed the underscore in "PYTHON_9.3" (You wrote "PYTHON 9.3")&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;exp = 'str(!NUM1!) + "\xb0" + str(!NUM2!)' arcpy.CalculateField_management("GISMainFabric_Line_Clip_0","Bear", exp,"PYTHON_9.3")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;If you want a space between the numbers and the minutes symbol after the second number, the expression should be:&lt;BR /&gt;&lt;BR /&gt;exp = 'str(!NUM1!) + "\xb0 " + str(!NUM2!) + "'"'&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I had done this in Model Builder and exported it to Python like I normally do this thread would not be up to 16 posts.&amp;nbsp; That is how I do it normally.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is from the Model Builder export of a calculation that worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;# Process: Calculate Field arcpy.CalculateField_management("GISMainFabric_Line_Clip_0", "Bear", "str( !NUM1! ) + \"\\xb0 \" + str( !NUM2! ) + \"'\"", "PYTHON_9.3", "")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 16:48:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277981#M21463</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-10-02T16:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277982#M21464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;oops, I had too many quotes... again the \' means you are passing the quote itself as text, so the extra one is going to fail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;exp = 'str(!NUM1!) + \'\xb0 \'' + str(!NUM2!)'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...should be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;exp = 'str(!NUM1!) + \'\xb0 \' + str(!NUM2!)'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This time I made the text color red for clarity. Sorry for the mishap, and also I told you to print out the exp as a statement so you can 'see' what is passed when you use it for the field calculator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 16:52:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277982#M21464</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-10-02T16:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277983#M21465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If I had done this in Model Builder and exported it to Python like I normally do this thread would not be up to 16 posts.&amp;nbsp; That is how I do it normally.&lt;BR /&gt;&lt;BR /&gt;Here is from the Model Builder export of a calculation that worked.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Process: Calculate Field
arcpy.CalculateField_management("GISMainFabric_Line_Clip_0", "Bear", "str( !NUM1! ) + \"\\xb0 \" + str( !NUM2! ) + \"'\"", "PYTHON_9.3", "")&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks rfairhur24 It Worked perfectly!!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:32:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277983#M21465</guid>
      <dc:creator>OLANIYANOLAKUNLE</dc:creator>
      <dc:date>2021-12-11T13:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277984#M21466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If I had done this in Model Builder and exported it to Python like I normally do this thread would not be up to 16 posts.&amp;nbsp; That is how I do it normally.&lt;BR /&gt;&lt;BR /&gt;Here is from the Model Builder export of a calculation that worked.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Process: Calculate Field
arcpy.CalculateField_management("GISMainFabric_Line_Clip_0", "Bear", "str( !NUM1! ) + \"\\xb0 \" + str( !NUM2! ) + \"'\"", "PYTHON_9.3", "")&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Harder to read though. I think you had it before, just needed to escape the ':&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
exp = 'str(!NUM1!) + "\xb0 " + str(!NUM2!) + "\'"'&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The whole deal is kind of confusing because you have to write code that has to evaluate to a string that has to evaluate to code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:32:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277984#M21466</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2021-12-11T13:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do i represent the degree (°) &amp; Minute (') symbols in my Python Script</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277985#M21467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Harder to read though. I think you had it before, just needed to escape the ':&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
exp = 'str(!NUM1!) + "\xb0 " + str(!NUM2!) + "\'"'&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;The whole deal is kind of confusing because you have to write code that has to evaluate to a string that has to evaluate to code.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I agree that the fix you suggest would work and is more readable.&amp;nbsp; I just prefer to use Model Builder to write the expression, because then I just have to write the equation, which is easier to read than anything I deal with in a Python script.&amp;nbsp; To get my output I just had to know how to write the expression:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;str( !NUM1! ) + "\xb0 " + str( !NUM2! ) + "'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Much easier to get correct than any of the python conversions to a string.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:32:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-represent-the-degree-amp-deg-amp-amp-amp/m-p/277985#M21467</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-11T13:32:13Z</dc:date>
    </item>
  </channel>
</rss>

