pdm init
may create non-UTF-8 README.md
and break pdm install
#1739
Labels
🐛 bug
Something isn't working
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
pdm init
. Leave everything as default except the following.y
啊
README.md
: it's platform-dependent locale.pdm install
⇒UnicodeDecodeError
Expected behavior
README.md
should be encoded as UTF-8 orself.DEFAULT_ENCODING
.pdm/src/pdm/cli/actions.py
Line 515 in f81e07c
(Sorry I can’t make a PR because I have no idea about how to write a test for it.)
Actual behavior
pdm init
. Leave everything as default except the following.Is the project a library that is installable?
y
Project description?
啊
or any non-ASCII string.Which build backend to use?
I’ve tested
pdm-pep517
(default) andsetuptools
. Both of them not work.For
setuptools
, the author’semail
should also be provided.Check the encoding of
README.md
: it's platform-dependent locale.Note: Details of the error message depends on your directory name, which determines the project name.
pdm install
.Full traceback of `pdm install -v`
Other commands (e.g.
pdm add
) also fail because of the same reason (pdm/pep517/metadata.py
).Change the encoding of
README.md
to UTF-8.Everything works fine now.
$ pdm install … 🎉 All complete!
Environment Information
Addition Information
pdm
bypipx
.The text was updated successfully, but these errors were encountered: