Closed sftblw closed 5 years ago
Thanks for the screenshot. I’ll take a look.
A few suggestions:
@BartG95 Thank you but nothing worked.
The code looks correct... Perhaps you can try it interactively by simply starting python3 and typing it? Like this, for example:
~/src/mastodon-archive$ python3
Python 3.7.3rc1 (default, Mar 13 2019, 11:01:15)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> with open("README.md", "r", encoding="utf-8") as fh:
... long_description = fh.read()
...
>>> print(len(long_description))
25939
This would allow us to understand whether this is a problem in Python, or a problem in the code used to install the project.
via git clone ->
Microsoft Windows [Version 10.0.17763.437]
(c) 2018 Microsoft Corporation. All rights reserved.
(deleted lines)
L:\Documents\_codebase\GitHub>cd mastodon-backup
L:\Documents\_codebase\GitHub\mastodon-backup>python
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> with open("README.md", "r", encoding="utf-8") as fh:
... long_description = fh.read()
...
>>> print(len(long_description))
25939
>>>
manually downloading from "files.pythonhosted.org" (where pip says) ->
(Using cached https://files.pythonhosted.org/packages/b9/ac/ac703bd0a8aac433c00fea2f3c360542b6cc897ad741cedf30df43d04b4c/mastodon_archive-1.1.0.tar.gz
)
Active code page: 65001
E:\Desktop\mastodon_archive-1.1.0>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> with open("README.md", "r", encoding="utf-8") as fh:
... long_description = fh.read()
...
>>> print(len(long_description))
23911
>>>
files.pythonhosted.org code does not have encoding param.
from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
(intentionally removed below lines)
so This looks like already fixed by #38 but not released yet. (1.1.0 is before #38 be merged).
Ah, of course. I assumed the current version included that patch already. Indeed, this is seems to be the solution. Thanks for reporting the bug and its solution 👍. @kensanata can you make a 1.2.0 release?
Done!
on running command :
pip3 install mastodon-archive
,cmd.exe
chcp 65001
cmd.exe
shows same error messageI guess It will happen on CJK Windows too, but not tested in Chinese, Japanese windows