You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/11/26 11:48:22 UTC

[GitHub] [incubator-mxnet] honglei opened a new issue #19591: Suport Chinese Characters in file Path

honglei opened a new issue #19591:
URL: https://github.com/apache/incubator-mxnet/issues/19591


   ## Description
   Env: Win10/Python3.8.9 x64/mxnet_cu102-1.7.0-py2.py3-none-win_amd64.whl from https://dist.mxnet.io/python/cu102
   ```python
   import os
   import mxnet as mx
   img_fp = r'D:\PythonDev\DocManagement\books\息烽民间故事选\page-1.png'
   assert os.path.isfile(img_fp)
   img = mx.image.imread(img_fp, 1)
   ```
   
   ### Error Message
   
   ```
    File "D:\PythonDev\DocManagement\mxnet_test.py", line 5, in <module>
     img = mx.image.imread(img_fp, 1)
   File "c:\Python37\Lib\site-packages\mxnet\image\image.py", line 93, in imread
     return read_fn(filename, *args, **kwargs)
   File "<string>", line 37, in _cvimread
   File "c:\Python37\Lib\site-packages\mxnet\_ctypes\ndarray.py", line 91, in _imperative_invoke
     ctypes.byref(out_stypes)))
   File "c:\Python37\Lib\site-packages\mxnet\base.py", line 246, in check_call
     raise get_last_ffi_error()
   
   mxnet.base.MXNetError: Traceback (most recent call last):
   File "C:\Jenkins\workspace\mxnet-tag\mxnet\src\io\image_io.cc", line 223
   Imread: Check failed: file.is_open(): 'D:\PythonDev\DocManagement\books\息烽民间故事选\page-1.png' couldn't open file: No such file or directory
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] honglei edited a comment on issue #19591: Suport Chinese Characters in file Path

Posted by GitBox <gi...@apache.org>.
honglei edited a comment on issue #19591:
URL: https://github.com/apache/incubator-mxnet/issues/19591#issuecomment-734765406


   @szha Yes,it was caused by `cv2.imread`. Many Thanks. The issue is here: https://github.com/opencv/opencv/issues/18305


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] honglei commented on issue #19591: Suport Chinese Characters in file Path

Posted by GitBox <gi...@apache.org>.
honglei commented on issue #19591:
URL: https://github.com/apache/incubator-mxnet/issues/19591#issuecomment-734765406


   @szha Yes,it was caused by `cv2.imread`. Many Thanks


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] szha commented on issue #19591: Suport Chinese Characters in file Path

Posted by GitBox <gi...@apache.org>.
szha commented on issue #19591:
URL: https://github.com/apache/incubator-mxnet/issues/19591#issuecomment-734428784


   @honglei thanks for reporting. `mx.image.imread` is a thin wrapper of opencv's imread, which doesn't seem to support utf-8 paths. For now I think you can use the following workaround:
   `mx.image.imdecode(np.fromfile(img_fp, dtype='uint8'))`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org