<?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 UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 11 in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/unicodedecodeerror-ascii-codec-can-t-decode-byte/m-p/1244586#M66370</link>
    <description>&lt;LI-CODE lang="python"&gt;# -*- coding: utf-8 -*-
"""
Created on Wed Jul 14 15:57:33 2021

@author: LESNIAM
"""

import geopandas as gpd
#import arcpy
import mapping_module1 as MM
from IPython.display import display
#from arcpy.display import display

gdf_corr = gpd.read_file('G:\Jason Ma\2022Q3 HERE shapefiles\Corridors\Old corridors\Toronto1.shp')
corridor_name = 'Toronto1'

gdf_corridor_sorted = MM.Order_the_Links(corridor_name,gdf_corr)
display(gdf_corridor_sorted)

gdf_corridor_sorted.to_file('G:\Jason Ma\2022Q3 HERE shapefiles\Corridors\Old corridors\Toronto1_done.shp')
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;Runtime error&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Python27\ArcGIS10.8\lib\site-packages\geopandas\io\file.py", line 76, in read_file&lt;BR /&gt;with reader(path_or_bytes, **kwargs) as features:&lt;BR /&gt;File "C:\Python27\ArcGIS10.8\lib\site-packages\fiona\env.py", line 398, in wrapper&lt;BR /&gt;return f(*args, **kwargs)&lt;BR /&gt;File "C:\Python27\ArcGIS10.8\lib\site-packages\fiona\__init__.py", line 257, in open&lt;BR /&gt;layer=layer, enabled_drivers=enabled_drivers, **kwargs)&lt;BR /&gt;File "C:\Python27\ArcGIS10.8\lib\site-packages\fiona\collection.py", line 154, in __init__&lt;BR /&gt;self.session.start(self, **kwargs)&lt;BR /&gt;File "fiona\ogrext.pyx", line 466, in fiona.ogrext.Session.start&lt;BR /&gt;UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 11: ordinal not in range(128)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There unifcode error that something wrong with the range I believe , this is something new, I not sure if I change the decoding or something ?&amp;nbsp; Any help and suggestion would be helpful , Thanks for the time , it worked with other shape file but not this one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Dec 2022 16:59:17 GMT</pubDate>
    <dc:creator>JasonMa</dc:creator>
    <dc:date>2022-12-30T16:59:17Z</dc:date>
    <item>
      <title>UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 11</title>
      <link>https://community.esri.com/t5/python-questions/unicodedecodeerror-ascii-codec-can-t-decode-byte/m-p/1244586#M66370</link>
      <description>&lt;LI-CODE lang="python"&gt;# -*- coding: utf-8 -*-
"""
Created on Wed Jul 14 15:57:33 2021

@author: LESNIAM
"""

import geopandas as gpd
#import arcpy
import mapping_module1 as MM
from IPython.display import display
#from arcpy.display import display

gdf_corr = gpd.read_file('G:\Jason Ma\2022Q3 HERE shapefiles\Corridors\Old corridors\Toronto1.shp')
corridor_name = 'Toronto1'

gdf_corridor_sorted = MM.Order_the_Links(corridor_name,gdf_corr)
display(gdf_corridor_sorted)

gdf_corridor_sorted.to_file('G:\Jason Ma\2022Q3 HERE shapefiles\Corridors\Old corridors\Toronto1_done.shp')
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;Runtime error&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;string&amp;gt;", line 14, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "C:\Python27\ArcGIS10.8\lib\site-packages\geopandas\io\file.py", line 76, in read_file&lt;BR /&gt;with reader(path_or_bytes, **kwargs) as features:&lt;BR /&gt;File "C:\Python27\ArcGIS10.8\lib\site-packages\fiona\env.py", line 398, in wrapper&lt;BR /&gt;return f(*args, **kwargs)&lt;BR /&gt;File "C:\Python27\ArcGIS10.8\lib\site-packages\fiona\__init__.py", line 257, in open&lt;BR /&gt;layer=layer, enabled_drivers=enabled_drivers, **kwargs)&lt;BR /&gt;File "C:\Python27\ArcGIS10.8\lib\site-packages\fiona\collection.py", line 154, in __init__&lt;BR /&gt;self.session.start(self, **kwargs)&lt;BR /&gt;File "fiona\ogrext.pyx", line 466, in fiona.ogrext.Session.start&lt;BR /&gt;UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 11: ordinal not in range(128)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There unifcode error that something wrong with the range I believe , this is something new, I not sure if I change the decoding or something ?&amp;nbsp; Any help and suggestion would be helpful , Thanks for the time , it worked with other shape file but not this one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 16:59:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unicodedecodeerror-ascii-codec-can-t-decode-byte/m-p/1244586#M66370</guid>
      <dc:creator>JasonMa</dc:creator>
      <dc:date>2022-12-30T16:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 11</title>
      <link>https://community.esri.com/t5/python-questions/unicodedecodeerror-ascii-codec-can-t-decode-byte/m-p/1244608#M66372</link>
      <description>&lt;P&gt;I would raw-encode the string.&amp;nbsp; (Python 2.7???)&lt;/P&gt;&lt;LI-CODE lang="python"&gt;r'G:\Jason Ma\2022Q3 HERE shapefiles\Corridors\Old corridors\Toronto1.shp'  # -- little r in front
'G:\\Jason Ma\\2022Q3 HERE shapefiles\\Corridors\\Old corridors\\Toronto1.shp'&lt;/LI-CODE&gt;&lt;P&gt;in any event, paths with spaces and those beginning with numbers are courting errors.&amp;nbsp; Move it would be the best solutioin&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2022 18:03:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unicodedecodeerror-ascii-codec-can-t-decode-byte/m-p/1244608#M66372</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-12-30T18:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 11</title>
      <link>https://community.esri.com/t5/python-questions/unicodedecodeerror-ascii-codec-can-t-decode-byte/m-p/1244769#M66378</link>
      <description>&lt;P&gt;You are having a text encoding issue.&amp;nbsp; See&amp;nbsp;&lt;A href="https://geopandas.org/en/stable/docs/reference/api/geopandas.read_file.html" target="_self"&gt;geopandas.read_file -- GeoPandas 0.12.2 documentation&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P class=""&gt;Notes&lt;/P&gt;&lt;P&gt;The format drivers will attempt to detect the encoding of your data, but may fail. In this case, the proper encoding can be specified explicitly by using the encoding keyword parameter, e.g. &lt;SPAN class=""&gt;encoding='utf-8'&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 02 Jan 2023 16:07:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/unicodedecodeerror-ascii-codec-can-t-decode-byte/m-p/1244769#M66378</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2023-01-02T16:07:34Z</dc:date>
    </item>
  </channel>
</rss>

