<h3 dir="auto">System information</h3>
<ul dir="auto">
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Windows 10</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary</li>
<li><strong>TensorFlow version (use command below)</strong>: 1.2.1</li>
<li><strong>Python version</strong>: 3.6</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">My tensorflow script on Ubuntu 16.04 works with the following code.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="file=tf.gfile.GFile('../../data/Gutenberg/txt/Anthony Trollope___La Vendée.txt')
text = file.read()"><pre class="notranslate"><code class="notranslate">file=tf.gfile.GFile('../../data/Gutenberg/txt/Anthony Trollope___La Vendée.txt')
text = file.read()
</code></pre></div>
<p dir="auto">However on Windows 10</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="file=tf.gfile.GFile('../../data/Gutenberg/txt/Anthony Trollope___La Vendée.txt')
text = file.read()"><pre class="notranslate"><code class="notranslate">file=tf.gfile.GFile('../../data/Gutenberg/txt/Anthony Trollope___La Vendée.txt')
text = file.read()
</code></pre></div>
<p dir="auto">gives the following error.  This happens when the filenames have special characters in them</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---------------------------------------------------------------------------
NotFoundError                             Traceback (most recent call last)
&lt;ipython-input-22-669eb528a808&gt; in &lt;module&gt;()
----&gt; 1 text = file.read()

C:\Users\xxx\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py in read(self, n)
    116       string if in string (regular) mode.
    117     &quot;&quot;&quot;
--&gt; 118     self._preread_check()
    119     with errors.raise_exception_on_not_ok_status() as status:
    120       if n == -1:

C:\Users\xxx\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py in _preread_check(self)
     76       with errors.raise_exception_on_not_ok_status() as status:
     77         self._read_buf = pywrap_tensorflow.CreateBufferedInputStream(
---&gt; 78             compat.as_bytes(self.__name), 1024 * 512, status)
     79 
     80   def _prewrite_check(self):

C:\Users\xxx\Anaconda3\lib\contextlib.py in __exit__(self, type, value, traceback)
     87         if type is None:
     88             try:
---&gt; 89                 next(self.gen)
     90             except StopIteration:
     91                 return

C:\Users\xxx\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py in raise_exception_on_not_ok_status()
    464           None, None,
    465           compat.as_text(pywrap_tensorflow.TF_Message(status)),
--&gt; 466           pywrap_tensorflow.TF_GetCode(status))
    467   finally:
    468     pywrap_tensorflow.TF_DeleteStatus(status)

NotFoundError: NewRandomAccessFile failed to Create/Open: ../../data/Gutenberg/txt/Anthony Trollope___La Vendée.txt : The system cannot find the file specified."><pre class="notranslate"><code class="notranslate">---------------------------------------------------------------------------
NotFoundError                             Traceback (most recent call last)
&lt;ipython-input-22-669eb528a808&gt; in &lt;module&gt;()
----&gt; 1 text = file.read()

C:\Users\xxx\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py in read(self, n)
    116       string if in string (regular) mode.
    117     """
--&gt; 118     self._preread_check()
    119     with errors.raise_exception_on_not_ok_status() as status:
    120       if n == -1:

C:\Users\xxx\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py in _preread_check(self)
     76       with errors.raise_exception_on_not_ok_status() as status:
     77         self._read_buf = pywrap_tensorflow.CreateBufferedInputStream(
---&gt; 78             compat.as_bytes(self.__name), 1024 * 512, status)
     79 
     80   def _prewrite_check(self):

C:\Users\xxx\Anaconda3\lib\contextlib.py in __exit__(self, type, value, traceback)
     87         if type is None:
     88             try:
---&gt; 89                 next(self.gen)
     90             except StopIteration:
     91                 return

C:\Users\xxx\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py in raise_exception_on_not_ok_status()
    464           None, None,
    465           compat.as_text(pywrap_tensorflow.TF_Message(status)),
--&gt; 466           pywrap_tensorflow.TF_GetCode(status))
    467   finally:
    468     pywrap_tensorflow.TF_DeleteStatus(status)

NotFoundError: NewRandomAccessFile failed to Create/Open: ../../data/Gutenberg/txt/Anthony Trollope___La Vendée.txt : The system cannot find the file specified.
</code></pre></div>
<p dir="auto">Note: pythons open()/read() works well on both platforms.  This error occurs for other file names  with special characters on windows too. I moved my data readers from python to tf api and data readers, the pipeline works on ubuntu but breaks in windows.</p>
<h3 dir="auto">System information</h3>
<ul dir="auto">
<li>
<p dir="auto"><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: Windows 10 x64</p>
</li>
<li>
<p dir="auto"><strong>TensorFlow installed from (source or binary)</strong>: binary from PyPI</p>
</li>
<li>
<p dir="auto"><strong>TensorFlow version (use command below)</strong>: 1.1.0</p>
</li>
<li>
<p dir="auto"><strong>Exact command to reproduce</strong>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from tensorflow.contrib.rnn.python.ops.gru_ops import *"><pre class="notranslate"><code class="notranslate">from tensorflow.contrib.rnn.python.ops.gru_ops import *
</code></pre></div>
</li>
</ul>
<h3 dir="auto">Describe the problem</h3>
<p dir="auto">I encountered this when importing keras but it's reproducible with the command above. My virtualenv is in a folder that has an accented character in its name (see the log below). If I install TensorFlow globally, it works.</p>
<h3 dir="auto">Source code / logs</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="D:\Marci\Programozás\algorimp\test&gt;venv\scripts\python -c &quot;from tensorflow.contrib.rnn.python.ops.gru_ops import *&quot;
Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\__init__.py&quot;, line 26, in &lt;module&gt;
    from tensorflow.contrib import crf
  File &quot;D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\crf\__init__.py&quot;, line 32, in &lt;module&gt;
    from tensorflow.contrib.crf.python.ops.crf import _lengths_to_masks
  File &quot;D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\crf\python\ops\crf.py&quot;, line 44, in &lt;module&gt;
    from tensorflow.contrib.rnn.python.ops import core_rnn_cell
  File &quot;D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\rnn\__init__.py&quot;, line 80, in &lt;module&gt;
    from tensorflow.contrib.rnn.python.ops.gru_ops import *
  File &quot;D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\rnn\python\ops\gru_ops.py&quot;, line 32, in &lt;module&gt;
    resource_loader.get_path_to_datafile(&quot;_gru_ops.so&quot;))
  File &quot;D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\util\loader.py&quot;, line 55, in load_op_library
    ret = load_library.load_op_library(path)
  File &quot;D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\python\framework\load_library.py&quot;, line 64, in load_op_library
    None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\rnn\python\ops\_gru_ops.dll not found"><pre class="notranslate"><code class="notranslate">D:\Marci\Programozás\algorimp\test&gt;venv\scripts\python -c "from tensorflow.contrib.rnn.python.ops.gru_ops import *"
Traceback (most recent call last):
  File "&lt;string&gt;", line 1, in &lt;module&gt;
  File "D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\__init__.py", line 26, in &lt;module&gt;
    from tensorflow.contrib import crf
  File "D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\crf\__init__.py", line 32, in &lt;module&gt;
    from tensorflow.contrib.crf.python.ops.crf import _lengths_to_masks
  File "D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\crf\python\ops\crf.py", line 44, in &lt;module&gt;
    from tensorflow.contrib.rnn.python.ops import core_rnn_cell
  File "D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\rnn\__init__.py", line 80, in &lt;module&gt;
    from tensorflow.contrib.rnn.python.ops.gru_ops import *
  File "D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\rnn\python\ops\gru_ops.py", line 32, in &lt;module&gt;
    resource_loader.get_path_to_datafile("_gru_ops.so"))
  File "D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\util\loader.py", line 55, in load_op_library
    ret = load_library.load_op_library(path)
  File "D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\python\framework\load_library.py", line 64, in load_op_library
    None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: D:\Marci\Programozás\algorimp\test\venv\lib\site-packages\tensorflow\contrib\rnn\python\ops\_gru_ops.dll not found
</code></pre></div>