MineDojo/Voyager

looks like that it is some problem with UnicodeDecodeError,i'm completely unfamiliar with it

ClareXUse opened this issue · 3 comments

PS D:\test\mine\Voyager> pip install -e .
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Obtaining file:///D:/test/mine/Voyager
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "D:\test\mine\Voyager\setup.py", line 38, in
long_description=_read_file("README.md"),
File "D:\test\mine\Voyager\setup.py", line 16, in _read_file
return fp.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa5 in position 2098: illegal multibyte sequence
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Try using a different codec to decode the file. For example, you can try using the 'utf-8' codec instead of 'gbk'.
Check if the file contains non-ASCII characters and remove them if possible.
Try upgrading pip to the latest version using the command python -m pip install --upgrade pip.
Try installing the package using a different version of Python or a different operating system.
Here's an example of how to use the 'utf-8' codec to decode the file in the setup.py script:
python
def _read_file(filename):
    with open(filename, 'r', encoding='utf-8') as fp:
        return fp.read()

This code replaces the 'gbk' codec with the 'utf-8' codec to decode the file.
If none of the above solutions work, you can try searching for the error message on the internet to see if others have encountered the same issue and found a solution. Some of the search results may provide additional information or insights on how to fix the error.

it looks like you are using a non standard language in your terminal. beyond that, it is hard to say without further OS details

Try to change .open() in line 15 and 20 in setup.py to .open(encoding='utf-8'), and everywhere else you find similar.

The issue will be closed due to a lack of activity, feel free to reopen it if you would like to continue the discussion.