AlexandreSenpai / Enma

Enma is a Python library designed to fetch and download manga and doujinshi data from many sources including Manganato and NHentai.
MIT License
94 stars 17 forks source link

fix: add encoding when opening readme #57

Closed gustaavv closed 11 months ago

gustaavv commented 11 months ago

I am using Windows 10 in Simplified Chinese (gbk encoding in cmd).

No matter run pip install enma or run python setup.py bdist_wheel after cloning the project, there is always an exception:

(venv) C:\Users\Elnino\Desktop\test\Enma>python setup.py bdist_wheel
Traceback (most recent call last):
  File "C:\Users\Elnino\Desktop\test\Enma\setup.py", line 31, in <module>
    make_setup()
  File "C:\Users\Elnino\Desktop\test\Enma\setup.py", line 12, in make_setup
    long_description=readme(),
                     ^^^^^^^^
  File "C:\Users\Elnino\Desktop\test\Enma\setup.py", line 5, in readme
    return readme.read()
           ^^^^^^^^^^^^^
UnicodeDecodeError: 'gbk' codec can't decode byte 0x85 in position 1708: illegal multibyte sequence

The solution is quite simple in my opinion: open with encoding utf-8. And it works.

AlexandreSenpai commented 11 months ago

Oh, thanks @el-nino2020. Could you please merge it to dev? I'm working in a task to improve the project building and publishing to pypi. I'm planning to deploy tomorrow

AlexandreSenpai commented 11 months ago

Hello @el-nino2020 can you try to install enma version 2.2.1? I guess its fixed now.

pip install enma==2.2.1

Any problems tell me

gustaavv commented 11 months ago

Thanks. pip install works now.