apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.77k stars 6.8k forks source link

Unicode Decode Error when import mxnet on win10 #20286

Open codealphago opened 3 years ago

codealphago commented 3 years ago

Description

(A clear and concise description of what the bug is.) On win10, I have compile MXNET 2.0 with Visul Studio 2019 successfully.When I validate MXNet Installation "import mxnet as mx",it was failed to load because of UnicodeDecodeError.I fix it to replace invalid characters in src.

Error Message

(Paste the complete error message. Please also include stack trace by setting environment variable DMLC_LOG_STACK_TRACE_DEPTH=100 before running your script.) import mxnet Traceback (most recent call last): File "", line 1, in File "D:\gvip\mxnet\source3\mxnet\python\mxnet__init__.py", line 33, in from . import contrib ... File "D:\gvip\mxnet\source3\mxnet\python\mxnet\ndarray\register.py", line 267, in _make_ndarray_function code, doc_str = _generate_ndarray_function_code(handle, name, func_name) File "D:\gvip\mxnet\source3\mxnet\python\mxnet\ndarray\register.py", line 143, in _generate_ndarray_function_code [py_str(arg_descs[i]) for i in range(narg)], File "D:\gvip\mxnet\source3\mxnet\python\mxnet\ndarray\register.py", line 143, in [py_str(arg_descs[i]) for i in range(narg)], File "D:\gvip\mxnet\source3\mxnet\python\mxnet\base.py", line 54, in py_str = lambda x: x.decode('utf-8') UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 23-24: invalid continuation byte

To Reproduce

(If you developed your own code, please provide a short script that reproduces the error. For existing examples, please provide link.) I have compile MXNET 2.0 with Visul Studio 2019(cmake,gpu,openblas)successfully.Installed built package to python env And import mxnet in python command.

Steps to reproduce

(Paste the commands you ran that produced the error.)

1.git clone --recursive https://github.com/apache/incubator-mxnet mxnet 2.choco install python git 7zip cmake ninja opencv 3.build openblas 4.set OpenBLAS_HOME 5.set OpenCV_DIR 6.set CUDA_PATH 7.cmake with Visul Studio 2019 8.cd mxnet path, python3 -m pip install --user -e ./python

What have you tried to solve it?

1.I replace invalid characters “’” and "“" to "'" .Check related PR later

Environment

We recommend using our script for collecting the diagnostic information with the following command curl --retry 10 -s https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py | python3

Environment Information ``` # Paste the diagnose.py command output here ```
github-actions[bot] commented 3 years ago

Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue. Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly. If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.