<?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: UnicodeDecodeError: utf8 codec can't decode byte invalid continuation byte in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483842#M37763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From: &lt;A href="https://community.esri.com/message/519769" target="_blank"&gt;SearchCursor directory and subdirectories using python&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run the code and py fined layers with YEUD=20&lt;/P&gt;&lt;P&gt;but i also get en error:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Traceback (most recent call last):
&amp;nbsp; File "C:\Users\yaron.KAYAMOT\Desktop\geonet.PY", line 11, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 23: invalid continuation byte
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;P&gt;i use files and folders names Right to left- how can i solve this issue please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 21:20:46 GMT</pubDate>
    <dc:creator>Yaron_YosefCohen</dc:creator>
    <dc:date>2021-12-11T21:20:46Z</dc:date>
    <item>
      <title>Re: UnicodeDecodeError: utf8 codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483842#M37763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From: &lt;A href="https://community.esri.com/message/519769" target="_blank"&gt;SearchCursor directory and subdirectories using python&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run the code and py fined layers with YEUD=20&lt;/P&gt;&lt;P&gt;but i also get en error:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Traceback (most recent call last):
&amp;nbsp; File "C:\Users\yaron.KAYAMOT\Desktop\geonet.PY", line 11, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 23: invalid continuation byte
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;P&gt;i use files and folders names Right to left- how can i solve this issue please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:20:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483842#M37763</guid>
      <dc:creator>Yaron_YosefCohen</dc:creator>
      <dc:date>2021-12-11T21:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483843#M37764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I started a new thread on this issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These links may help, but I have no experience with international codesets -- perhaps you need to encode your path strings before parsing them, or do something with locale - or somehow change your codec to Latin-1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/442143"&gt;UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 6: ordinal not in range(128)&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/5552555/unicodedecodeerror-invalid-continuation-byte" title="http://stackoverflow.com/questions/5552555/unicodedecodeerror-invalid-continuation-byte"&gt;python - UnicodeDecodeError, invalid continuation byte - Stack Overflow&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 10:35:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483843#M37764</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-17T10:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483844#M37765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check to make sure your indentations are correct and : are placed where they should be, etc.&amp;nbsp; I've received similar errors&amp;nbsp; when I've had just a typo several lines up.&amp;nbsp; i know this question was spun off another with coding suggestions., so maybe&amp;nbsp; something was missed when merging with your code.&amp;nbsp; Errors can be deceiving sometimes, so worth a syntax check.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 May 2015 16:21:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483844#M37765</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-05-17T16:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483845#M37766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rebecca,&lt;/P&gt;&lt;P&gt;i run the code and there where no identations error-else python would not&amp;nbsp; run the code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2015 04:28:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483845#M37766</guid>
      <dc:creator>Yaron_YosefCohen</dc:creator>
      <dc:date>2015-05-18T04:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483846#M37767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YYC - It may be helpful for others if you post the full code where you are getting an error.&amp;nbsp; The post this was spun off of shows Curtis' suggestion, but not you final code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2015 14:52:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483846#M37767</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-05-18T14:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483847#M37768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rebecca,&lt;/P&gt;&lt;P&gt;this is the code:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os
import fnmatch
import arcpy
rootPath = r"C:\Project\layers" 
pattern = 'mig*.shp' 
for root, dirs, files in os.walk(rootPath): 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename in fnmatch.filter(files, pattern): 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shp = os.path.join(root, filename)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if arcpy.ListFields(shp, "YEUD"):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("{} has YEUD field".format(shp)) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.SearchCursor(shp, ["YEUD"]) as rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[0] == 20:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("{} has a record with YEUD = 20".format(shp))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:20:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483847#M37768</guid>
      <dc:creator>Yaron_YosefCohen</dc:creator>
      <dc:date>2021-12-11T21:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483848#M37769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based on this:&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/6539881/python-converting-from-iso-8859-1-latin1-to-utf-8" title="http://stackoverflow.com/questions/6539881/python-converting-from-iso-8859-1-latin1-to-utf-8"&gt;character encoding - Python: Converting from ISO-8859-1/latin1 to UTF-8 - Stack Overflow&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if you may be able to fix this by doing a quick conversion to utf-8:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14320117361788073" data-renderedposition="92_8_912_16" jivemacro_uid="_14320117361788073"&gt;&lt;P&gt;shp = (os.path.join(root, filename)).encode("utf-8")&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 05:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483848#M37769</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-19T05:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483849#M37770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i get an error :&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; 
Traceback (most recent call last):
&amp;nbsp; File "C:\Users\yaron.KAYAMOT\Desktop\python.py", line 9, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; shp = (os.path.join(root, filename)).encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 23: ordinal not in range(128)
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:20:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483849#M37770</guid>
      <dc:creator>Yaron_YosefCohen</dc:creator>
      <dc:date>2021-12-11T21:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483850#M37771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I didn't read the post I linked carefully enough. In this example iso-8859-1 is the codes your paths are in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="_jivemacro_uid_14320142667586939 jive_macro_code jive_text_macro" data-renderedposition="50_8_912_16" jivemacro_uid="_14320142667586939"&gt;&lt;P&gt;shp.decode('iso-8859-1').encode('utf-8')&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm going to link the post again because it has lots of really useful information about unicode, latin1, utf-8... &lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/5552555/unicodedecodeerror-invalid-continuation-byte"&gt;python - UnicodeDecodeError, invalid continuation byte - Stack Overflow&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 05:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483850#M37771</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-19T05:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483851#M37772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; where to&amp;nbsp; insert this route?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 05:52:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483851#M37772</guid>
      <dc:creator>Yaron_YosefCohen</dc:creator>
      <dc:date>2015-05-19T05:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483852#M37773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This line is a replacement for line 08. I was hoping someone that knows more about international characters will chime in!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 05:58:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483852#M37773</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-19T05:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483853#M37774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i get an error:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt;


Traceback (most recent call last):
&amp;nbsp; File "C:\Users\yaron.KAYAMOT\Desktop\python.py", line 9, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; shp.decode('iso-8859-1').encode('utf-8')
NameError: name 'shp' is not defined
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:20:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483853#M37774</guid>
      <dc:creator>Yaron_YosefCohen</dc:creator>
      <dc:date>2021-12-11T21:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483854#M37775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_143201570745360 jive_text_macro" data-renderedposition="29_8_912_16" jivemacro_uid="_143201570745360"&gt;&lt;P&gt;shp = (os.path.join(root, filename)).decode('iso-8859-1').encode("utf-8")&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 06:08:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483854#M37775</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-19T06:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483855#M37776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;an error:&lt;/P&gt;&lt;P&gt;IOError: &amp;lt;unprintable IOError object&amp;gt;&lt;/P&gt;&lt;P&gt;i think now there no unicode error -but there problem else&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 06:16:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483855#M37776</guid>
      <dc:creator>Yaron_YosefCohen</dc:creator>
      <dc:date>2015-05-19T06:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483856#M37777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you're going to have to find someone that has a better handle on this unicode stuff. I added some tags that maybe will attract some help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 06:25:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483856#M37777</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-19T06:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483857#M37778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YYC,&lt;/P&gt;&lt;P&gt;I'm not familiar with unicode, but I did test you code with a some of my own shape files against a field ACRES (format DOUBLE) and it worded without an error.&amp;nbsp; What is the format of your "YEUD" field?&amp;nbsp; The code I used (changed to match my data):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os&amp;nbsp; 
import fnmatch&amp;nbsp; 
import arcpy&amp;nbsp; 
rootPath = r"D:\Project\layers"&amp;nbsp;&amp;nbsp; 
pattern = 'lake*.shp'&amp;nbsp;&amp;nbsp; 
for root, dirs, files in os.walk(rootPath):&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for filename in fnmatch.filter(files, pattern):&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shp = os.path.join(root, filename)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if arcpy.ListFields(shp, "ACRES"):&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("{} has ACRES field".format(shp))&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.SearchCursor(shp, ["ACRES"]) as rows:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row[0] &amp;gt; 300000:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("{} has a record with ACRES &amp;gt; 3000000".format(shp))&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break&amp;nbsp; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My results were:&lt;/P&gt;&lt;P&gt;D:\Project\layers\lakes.shp has ACRES field&lt;/P&gt;&lt;P&gt;D:\Project\layers\lakes.shp has a record with ACRES &amp;gt; 3000000&lt;/P&gt;&lt;P&gt;D:\Project\layers\lake_10.shp has ACRES field&lt;/P&gt;&lt;P&gt;D:\Project\layers\lake_11.shp has ACRES field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:20:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483857#M37778</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-11T21:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483858#M37779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;YYC's issue is not my scripting -- he's working with international characters in the path names, which are way out of my expertise!!&amp;nbsp; The YEUD field is an integer (in the international language of IEEE representations) so there is not a problem there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YYC, I'm afraid think you may need to ask for tech support from your local Esri affiliate or user groups on this one. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 18:30:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483858#M37779</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-19T18:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483859#M37780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca, &lt;/P&gt;&lt;P&gt;"YEUD" field type is Double&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 04:57:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483859#M37780</guid>
      <dc:creator>Yaron_YosefCohen</dc:creator>
      <dc:date>2015-05-20T04:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483860#M37781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I said YEUD is not the issue, it's the feature class pathname (shp) using those funky right-to-left characters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 05:08:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483860#M37781</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-20T05:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: utf8' codec can't decode byte invalid continuation byte</title>
      <link>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483861#M37782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would gave to agree with Curtus then, if the code i show above doesn't work on the YEUD field then it's probably above my knowledge.&amp;nbsp; So, sorry, but I can't offer anything more, hopefully someone else can help you out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i did grab the code myself, not that I have an immediate need to do what you are trying to do, but it might be something I can use in the future.&amp;nbsp; Nice little utility (at least with my data).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 05:11:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-unicodedecodeerror-utf8-codec-can-t-decode-byte/m-p/483861#M37782</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-05-20T05:11:10Z</dc:date>
    </item>
  </channel>
</rss>

