XiongPengNUS / rsome

Robust Stochastic Optimization Made Easy
GNU General Public License v3.0
282 stars 54 forks source link

UnicodeDecodeError when installation #44

Closed Prinway closed 1 year ago

Prinway commented 1 year ago

I'm using Python 3.7.0 with the latest pip (23.1.1). An UnicodeDecodeError occurs when installing RSOME 1.1.4.

Installing build dependencies ... done Getting requirements to build wheel ... error

Here are the traceback outputs:

Traceback (most recent call last): File "c:\program files\python\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "c:\program files\python\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "c:\program files\python\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "C:\Users{My Username}\AppData\Local\Temp\pip-build-env-r3zs_na9\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "C:\Users{My Username}\AppData\Local\Temp\pip-build-env-r3zs_na9\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires self.run_setup() File "C:\Users{My Username}\AppData\Local\Temp\pip-build-env-r3zs_na9\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
exec(code, locals()) File "", line 5, in UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 5487: illegal multibyte sequence

Prinway commented 1 year ago

My OS is Windows with the language of Chinese. For some reason, Python would try to decode the file content as gbk. As hinted in the above output, there must be some characters that cannot be decoded by gbk. I download the source code of RSOME and tried to debug locally and find the troublemaking character .

More specifically, it is the character between the two number of pages 3329 and 3339 in the citation of your great paper in the README.md.

I replaced the to - and repackaged the project. After that, the installation is fully successful! Users who are using ASCII incompatible encodings would appreciate if you can fix this in the new versions. Thank you!

XiongPengNUS commented 1 year ago

Hi @Prinway thank you for reporting this issue. We have changed the hyphen sign in the README file for version 1.2.0. Hopefully, this installation issue is fixed.