<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas
cyrillic_filename = &quot;./файл_1.csv&quot;
# 'c' engine fails:
df = pandas.read_csv(cyrillic_filename, engine=&quot;c&quot;, encoding=&quot;cp1251&quot;)
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
&lt;ipython-input-18-9cb08141730c&gt; in &lt;module&gt;()
      2 
      3 cyrillic_filename = &quot;./файл_1.csv&quot;
----&gt; 4 df = pandas.read_csv(cyrillic_filename , engine=&quot;c&quot;, encoding=&quot;cp1251&quot;)

d:\0_dev\services\protocol_sort\venv\lib\site-packages\pandas\io\parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skipfooter, skip_footer, doublequote, delim_whitespace, as_recarray, compact_ints, use_unsigned, low_memory, buffer_lines, memory_map, float_precision)
    653                     skip_blank_lines=skip_blank_lines)
    654 
--&gt; 655         return _read(filepath_or_buffer, kwds)
    656 
    657     parser_f.__name__ = name

d:\0_dev\services\protocol_sort\venv\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds)
    403 
    404     # Create the parser.
--&gt; 405     parser = TextFileReader(filepath_or_buffer, **kwds)
    406 
    407     if chunksize or iterator:

d:\0_dev\services\protocol_sort\venv\lib\site-packages\pandas\io\parsers.py in __init__(self, f, engine, **kwds)
    762             self.options['has_index_names'] = kwds['has_index_names']
    763 
--&gt; 764         self._make_engine(self.engine)
    765 
    766     def close(self):

d:\0_dev\services\protocol_sort\venv\lib\site-packages\pandas\io\parsers.py in _make_engine(self, engine)
    983     def _make_engine(self, engine='c'):
    984         if engine == 'c':
--&gt; 985             self._engine = CParserWrapper(self.f, **self.options)
    986         else:
    987             if engine == 'python':

d:\0_dev\services\protocol_sort\venv\lib\site-packages\pandas\io\parsers.py in __init__(self, src, **kwds)
   1603         kwds['allow_leading_cols'] = self.index_col is not False
   1604 
-&gt; 1605         self._reader = parsers.TextReader(src, **kwds)
   1606 
   1607         # XXX
pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader.__cinit__ (pandas\_libs\parsers.c:4209)()
pandas\_libs\parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source (pandas\_libs\parsers.c:8895)()
OSError: Initializing from file failed

# 'python' engine work:
df = pandas.read_csv(cyrillic_filename, engine=&quot;python&quot;, encoding=&quot;cp1251&quot;)
df.size
&gt;&gt;172440

# 'c' engine works if filename can be encoded to utf-8
latin_filename = &quot;./file_1.csv&quot;
df = pandas.read_csv(latin_filename, engine=&quot;c&quot;, encoding=&quot;cp1251&quot;)
df.size
&gt;&gt;172440"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span>
<span class="pl-s1">cyrillic_filename</span> <span class="pl-c1">=</span> <span class="pl-s">"./файл_1.csv"</span>
<span class="pl-c"># 'c' engine fails:</span>
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">read_csv</span>(<span class="pl-s1">cyrillic_filename</span>, <span class="pl-s1">engine</span><span class="pl-c1">=</span><span class="pl-s">"c"</span>, <span class="pl-s1">encoding</span><span class="pl-c1">=</span><span class="pl-s">"cp1251"</span>)
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">OSError</span>                                   <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">18</span><span class="pl-c1">-</span><span class="pl-c1">9</span><span class="pl-s1">cb08141730c</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>()
      <span class="pl-c1">2</span> 
      <span class="pl-c1">3</span> <span class="pl-s1">cyrillic_filename</span> <span class="pl-c1">=</span> <span class="pl-s">"./файл_1.csv"</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">4</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">read_csv</span>(<span class="pl-s1">cyrillic_filename</span> , <span class="pl-s1">engine</span><span class="pl-c1">=</span><span class="pl-s">"c"</span>, <span class="pl-s1">encoding</span><span class="pl-c1">=</span><span class="pl-s">"cp1251"</span>)

<span class="pl-s1">d</span>:\0<span class="pl-s1">_dev</span>\s<span class="pl-s1">ervices</span>\p<span class="pl-s1">rotocol_sort</span>\v<span class="pl-s1">env</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\p<span class="pl-s1">andas</span>\i<span class="pl-s1">o</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">parser_f</span>(<span class="pl-s1">filepath_or_buffer</span>, <span class="pl-s1">sep</span>, <span class="pl-s1">delimiter</span>, <span class="pl-s1">header</span>, <span class="pl-s1">names</span>, <span class="pl-s1">index_col</span>, <span class="pl-s1">usecols</span>, <span class="pl-s1">squeeze</span>, <span class="pl-s1">prefix</span>, <span class="pl-s1">mangle_dupe_cols</span>, <span class="pl-s1">dtype</span>, <span class="pl-s1">engine</span>, <span class="pl-s1">converters</span>, <span class="pl-s1">true_values</span>, <span class="pl-s1">false_values</span>, <span class="pl-s1">skipinitialspace</span>, <span class="pl-s1">skiprows</span>, <span class="pl-s1">nrows</span>, <span class="pl-s1">na_values</span>, <span class="pl-s1">keep_default_na</span>, <span class="pl-s1">na_filter</span>, <span class="pl-s1">verbose</span>, <span class="pl-s1">skip_blank_lines</span>, <span class="pl-s1">parse_dates</span>, <span class="pl-s1">infer_datetime_format</span>, <span class="pl-s1">keep_date_col</span>, <span class="pl-s1">date_parser</span>, <span class="pl-s1">dayfirst</span>, <span class="pl-s1">iterator</span>, <span class="pl-s1">chunksize</span>, <span class="pl-s1">compression</span>, <span class="pl-s1">thousands</span>, <span class="pl-s1">decimal</span>, <span class="pl-s1">lineterminator</span>, <span class="pl-s1">quotechar</span>, <span class="pl-s1">quoting</span>, <span class="pl-s1">escapechar</span>, <span class="pl-s1">comment</span>, <span class="pl-s1">encoding</span>, <span class="pl-s1">dialect</span>, <span class="pl-s1">tupleize_cols</span>, <span class="pl-s1">error_bad_lines</span>, <span class="pl-s1">warn_bad_lines</span>, <span class="pl-s1">skipfooter</span>, <span class="pl-s1">skip_footer</span>, <span class="pl-s1">doublequote</span>, <span class="pl-s1">delim_whitespace</span>, <span class="pl-s1">as_recarray</span>, <span class="pl-s1">compact_ints</span>, <span class="pl-s1">use_unsigned</span>, <span class="pl-s1">low_memory</span>, <span class="pl-s1">buffer_lines</span>, <span class="pl-s1">memory_map</span>, <span class="pl-s1">float_precision</span>)
    <span class="pl-c1">653</span>                     <span class="pl-s1">skip_blank_lines</span><span class="pl-c1">=</span><span class="pl-s1">skip_blank_lines</span>)
    <span class="pl-c1">654</span> 
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">655</span>         <span class="pl-s1">return</span> <span class="pl-en">_read</span>(<span class="pl-s1">filepath_or_buffer</span>, <span class="pl-s1">kwds</span>)
    <span class="pl-c1">656</span> 
    <span class="pl-c1">657</span>     <span class="pl-s1">parser_f</span>.<span class="pl-s1">__name__</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span>

<span class="pl-s1">d</span>:\0<span class="pl-s1">_dev</span>\s<span class="pl-s1">ervices</span>\p<span class="pl-s1">rotocol_sort</span>\v<span class="pl-s1">env</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\p<span class="pl-s1">andas</span>\i<span class="pl-s1">o</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_read</span>(<span class="pl-s1">filepath_or_buffer</span>, <span class="pl-s1">kwds</span>)
    <span class="pl-c1">403</span> 
    <span class="pl-c1">404</span>     <span class="pl-c"># Create the parser.</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">405</span>     <span class="pl-s1">parser</span> <span class="pl-c1">=</span> <span class="pl-v">TextFileReader</span>(<span class="pl-s1">filepath_or_buffer</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>)
    <span class="pl-c1">406</span> 
    <span class="pl-c1">407</span>     <span class="pl-k">if</span> <span class="pl-s1">chunksize</span> <span class="pl-c1">or</span> <span class="pl-s1">iterator</span>:

<span class="pl-s1">d</span>:\0<span class="pl-s1">_dev</span>\s<span class="pl-s1">ervices</span>\p<span class="pl-s1">rotocol_sort</span>\v<span class="pl-s1">env</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\p<span class="pl-s1">andas</span>\i<span class="pl-s1">o</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">f</span>, <span class="pl-s1">engine</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>)
    <span class="pl-c1">762</span>             <span class="pl-s1">self</span>.<span class="pl-s1">options</span>[<span class="pl-s">'has_index_names'</span>] <span class="pl-c1">=</span> <span class="pl-s1">kwds</span>[<span class="pl-s">'has_index_names'</span>]
    <span class="pl-c1">763</span> 
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">764</span>         <span class="pl-s1">self</span>.<span class="pl-en">_make_engine</span>(<span class="pl-s1">self</span>.<span class="pl-s1">engine</span>)
    <span class="pl-c1">765</span> 
    <span class="pl-c1">766</span>     <span class="pl-s1">def</span> <span class="pl-en">close</span>(<span class="pl-s1">self</span>):

<span class="pl-s1">d</span>:\0<span class="pl-s1">_dev</span>\s<span class="pl-s1">ervices</span>\p<span class="pl-s1">rotocol_sort</span>\v<span class="pl-s1">env</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\p<span class="pl-s1">andas</span>\i<span class="pl-s1">o</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_make_engine</span>(<span class="pl-s1">self</span>, <span class="pl-s1">engine</span>)
    <span class="pl-c1">983</span>     <span class="pl-s1">def</span> <span class="pl-en">_make_engine</span>(<span class="pl-s1">self</span>, <span class="pl-s1">engine</span><span class="pl-c1">=</span><span class="pl-s">'c'</span>):
    <span class="pl-c1">984</span>         <span class="pl-k">if</span> <span class="pl-s1">engine</span> <span class="pl-c1">==</span> <span class="pl-s">'c'</span>:
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">985</span>             <span class="pl-s1">self</span>.<span class="pl-s1">_engine</span> <span class="pl-c1">=</span> <span class="pl-v">CParserWrapper</span>(<span class="pl-s1">self</span>.<span class="pl-s1">f</span>, <span class="pl-c1">**</span><span class="pl-s1">self</span>.<span class="pl-s1">options</span>)
    <span class="pl-c1">986</span>         <span class="pl-k">else</span>:
    <span class="pl-c1">987</span>             <span class="pl-k">if</span> <span class="pl-s1">engine</span> <span class="pl-c1">==</span> <span class="pl-s">'python'</span>:

<span class="pl-s1">d</span>:\0<span class="pl-s1">_dev</span>\s<span class="pl-s1">ervices</span>\p<span class="pl-s1">rotocol_sort</span>\v<span class="pl-s1">env</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\p<span class="pl-s1">andas</span>\i<span class="pl-s1">o</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">src</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>)
   <span class="pl-c1">1603</span>         <span class="pl-s1">kwds</span>[<span class="pl-s">'allow_leading_cols'</span>] <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">index_col</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-c1">False</span>
   <span class="pl-c1">1604</span> 
<span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1605</span>         <span class="pl-s1">self</span>.<span class="pl-s1">_reader</span> <span class="pl-c1">=</span> <span class="pl-s1">parsers</span>.<span class="pl-v">TextReader</span>(<span class="pl-s1">src</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>)
   <span class="pl-c1">1606</span> 
   <span class="pl-c1">1607</span>         <span class="pl-c"># XXX</span>
<span class="pl-s1">pandas</span>\_<span class="pl-s1">libs</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">_libs</span>.<span class="pl-s1">parsers</span>.<span class="pl-v">TextReader</span>.<span class="pl-en">__cinit__</span> (<span class="pl-s1">pandas</span>\_<span class="pl-s1">libs</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">c</span>:<span class="pl-c1">4209</span>)()
<span class="pl-s1">pandas</span>\_<span class="pl-s1">libs</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">pyx</span> <span class="pl-c1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">_libs</span>.<span class="pl-s1">parsers</span>.<span class="pl-v">TextReader</span>.<span class="pl-en">_setup_parser_source</span> (<span class="pl-s1">pandas</span>\_<span class="pl-s1">libs</span>\p<span class="pl-s1">arsers</span>.<span class="pl-s1">c</span>:<span class="pl-c1">8895</span>)()
<span class="pl-v">OSError</span>: <span class="pl-v">Initializing</span> <span class="pl-k">from</span> <span class="pl-s1">file</span> <span class="pl-s1">failed</span>

<span class="pl-c"># 'python' engine work:</span>
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">read_csv</span>(<span class="pl-s1">cyrillic_filename</span>, <span class="pl-s1">engine</span><span class="pl-c1">=</span><span class="pl-s">"python"</span>, <span class="pl-s1">encoding</span><span class="pl-c1">=</span><span class="pl-s">"cp1251"</span>)
<span class="pl-s1">df</span>.<span class="pl-s1">size</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">172440</span>

<span class="pl-c"># 'c' engine works if filename can be encoded to utf-8</span>
<span class="pl-s1">latin_filename</span> <span class="pl-c1">=</span> <span class="pl-s">"./file_1.csv"</span>
<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pandas</span>.<span class="pl-en">read_csv</span>(<span class="pl-s1">latin_filename</span>, <span class="pl-s1">engine</span><span class="pl-c1">=</span><span class="pl-s">"c"</span>, <span class="pl-s1">encoding</span><span class="pl-c1">=</span><span class="pl-s">"cp1251"</span>)
<span class="pl-s1">df</span>.<span class="pl-s1">size</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">172440</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">The 'c' engine should read the files with non-UTF-8 filenames</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">File content readed into dataframe</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.1.final.0<br>
python-bits: 32<br>
OS: Windows<br>
OS-release: 7<br>
machine: AMD64<br>
processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: None<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.20.3<br>
pytest: None<br>
pip: 9.0.1<br>
setuptools: 28.8.0<br>
Cython: None<br>
numpy: 1.13.2<br>
scipy: 0.19.1<br>
xarray: None<br>
IPython: 6.2.1<br>
sphinx: None<br>
patsy: None<br>
dateutil: 2.6.1<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: None<br>
tables: None<br>
numexpr: None<br>
feather: None<br>
matplotlib: None<br>
openpyxl: 2.4.8<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: 4.0.0<br>
bs4: None<br>
html5lib: 1.0b10<br>
sqlalchemy: None<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.6<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None<br>
None</p>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<p dir="auto"><code class="notranslate">test.txt</code> and <code class="notranslate">test_é.txt</code> are the same file, only the name change:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pd.read_csv('test.txt')
Out[3]: 
   1 1 1
0  1 1 1
1  1 1 1

pd.read_csv('test_é.txt')
Traceback (most recent call last):

  File &quot;&lt;ipython-input-4-fd67679d1d17&gt;&quot;, line 1, in &lt;module&gt;
    pd.read_csv('test_é.txt')

  File &quot;d:\app\python36\lib\site-packages\pandas\io\parsers.py&quot;, line 646, in parser_f
    return _read(filepath_or_buffer, kwds)

  File &quot;d:\app\python36\lib\site-packages\pandas\io\parsers.py&quot;, line 389, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)

  File &quot;d:\app\python36\lib\site-packages\pandas\io\parsers.py&quot;, line 730, in __init__
    self._make_engine(self.engine)

  File &quot;d:\app\python36\lib\site-packages\pandas\io\parsers.py&quot;, line 923, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)

  File &quot;d:\app\python36\lib\site-packages\pandas\io\parsers.py&quot;, line 1390, in __init__
    self._reader = _parser.TextReader(src, **kwds)

  File &quot;pandas\parser.pyx&quot;, line 373, in pandas.parser.TextReader.__cinit__ (pandas\parser.c:4184)

  File &quot;pandas\parser.pyx&quot;, line 669, in pandas.parser.TextReader._setup_parser_source (pandas\parser.c:8471)

OSError: Initializing from file failed
"><pre class="notranslate"><span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">'test.txt'</span>)
<span class="pl-v">Out</span>[<span class="pl-c1">3</span>]: 
   <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span>
<span class="pl-c1">0</span>  <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span>
<span class="pl-c1">1</span>  <span class="pl-c1">1</span> <span class="pl-c1">1</span> <span class="pl-c1">1</span>

<span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">'test_é.txt'</span>)
<span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>):

  <span class="pl-v">File</span> <span class="pl-s">"&lt;ipython-input-4-fd67679d1d17&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>
    <span class="pl-s1">pd</span>.<span class="pl-en">read_csv</span>(<span class="pl-s">'test_é.txt'</span>)

  <span class="pl-v">File</span> <span class="pl-s">"d:<span class="pl-cce">\a</span>pp\python36\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">646</span>, <span class="pl-s1">in</span> <span class="pl-s1">parser_f</span>
    <span class="pl-k">return</span> <span class="pl-en">_read</span>(<span class="pl-s1">filepath_or_buffer</span>, <span class="pl-s1">kwds</span>)

  <span class="pl-v">File</span> <span class="pl-s">"d:<span class="pl-cce">\a</span>pp\python36\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">389</span>, <span class="pl-s1">in</span> <span class="pl-s1">_read</span>
    <span class="pl-s1">parser</span> <span class="pl-c1">=</span> <span class="pl-v">TextFileReader</span>(<span class="pl-s1">filepath_or_buffer</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>)

  <span class="pl-v">File</span> <span class="pl-s">"d:<span class="pl-cce">\a</span>pp\python36\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">730</span>, <span class="pl-s1">in</span> <span class="pl-s1">__init__</span>
    <span class="pl-s1">self</span>.<span class="pl-en">_make_engine</span>(<span class="pl-s1">self</span>.<span class="pl-s1">engine</span>)

  <span class="pl-v">File</span> <span class="pl-s">"d:<span class="pl-cce">\a</span>pp\python36\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">923</span>, <span class="pl-s1">in</span> <span class="pl-s1">_make_engine</span>
    <span class="pl-s1">self</span>.<span class="pl-s1">_engine</span> <span class="pl-c1">=</span> <span class="pl-v">CParserWrapper</span>(<span class="pl-s1">self</span>.<span class="pl-s1">f</span>, <span class="pl-c1">**</span><span class="pl-s1">self</span>.<span class="pl-s1">options</span>)

  <span class="pl-v">File</span> <span class="pl-s">"d:<span class="pl-cce">\a</span>pp\python36\lib\site-packages\pandas\io\parsers.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1390</span>, <span class="pl-s1">in</span> <span class="pl-s1">__init__</span>
    <span class="pl-s1">self</span>.<span class="pl-s1">_reader</span> <span class="pl-c1">=</span> <span class="pl-s1">_parser</span>.<span class="pl-v">TextReader</span>(<span class="pl-s1">src</span>, <span class="pl-c1">**</span><span class="pl-s1">kwds</span>)

  <span class="pl-v">File</span> <span class="pl-s">"pandas\parser.pyx"</span>, <span class="pl-s1">line</span> <span class="pl-c1">373</span>, <span class="pl-s1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">parser</span>.<span class="pl-v">TextReader</span>.<span class="pl-en">__cinit__</span> (<span class="pl-s1">pandas</span>\p<span class="pl-s1">arser</span>.<span class="pl-s1">c</span>:<span class="pl-c1">4184</span>)

  <span class="pl-v">File</span> <span class="pl-s">"pandas\parser.pyx"</span>, <span class="pl-s1">line</span> <span class="pl-c1">669</span>, <span class="pl-s1">in</span> <span class="pl-s1">pandas</span>.<span class="pl-s1">parser</span>.<span class="pl-v">TextReader</span>.<span class="pl-en">_setup_parser_source</span> (<span class="pl-s1">pandas</span>\p<span class="pl-s1">arser</span>.<span class="pl-s1">c</span>:<span class="pl-c1">8471</span>)

<span class="pl-v">OSError</span>: <span class="pl-v">Initializing</span> <span class="pl-k">from</span> <span class="pl-s1">file</span> <span class="pl-s1">failed</span></pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">Pandas return OSError when trying to read a file with accents in file path.</p>
<p dir="auto">The problem is new (Since I upgraded to Python 3.6 and Pandas 0.19.2)</p>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.6.0.final.0<br>
python-bits: 64<br>
OS: Windows<br>
OS-release: 7<br>
machine: AMD64<br>
processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: fr<br>
LOCALE: None.None</p>
<p dir="auto">pandas: 0.19.2<br>
nose: None<br>
pip: 9.0.1<br>
setuptools: 32.3.1<br>
Cython: 0.25.2<br>
numpy: 1.11.3<br>
scipy: 0.18.1<br>
statsmodels: None<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.5.1<br>
patsy: None<br>
dateutil: 2.6.0<br>
pytz: 2016.10<br>
blosc: None<br>
bottleneck: 1.2.0<br>
tables: None<br>
numexpr: 2.6.1<br>
matplotlib: 1.5.3<br>
openpyxl: None<br>
xlrd: None<br>
xlwt: None<br>
xlsxwriter: None<br>
lxml: None<br>
bs4: None<br>
html5lib: 0.999999999<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.1.4<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.9.3<br>
boto: None<br>
pandas_datareader: None</p>
</details>