Open vishalnandagopal opened 1 year ago
Does pipreqs not parse unicode characters? Ø seems to be a valid unicode character but not a basic ASCII character.
I tried to fix it in black itself, but it was rightly closed since the issue is not in black.
Seems like pipreqs doesn't use the correct encoding (utf-8 by default) for opening Python files. The error message posted above has mojibake, suggesting the file was opened in something like Latin-1 instead of UTF-8.
This seems to be occurring due to this line in this file - https://github.com/psf/black/blob/a552f7096a9f6e016c9bb1df1e0a77a17caeec1c/src/black/linegen.py#L471 due to the weird variable name.
Because Black is such a popular library, and the variable name seems to be valid, any workarounds for using pipreqs to generate a requirements.txt file?