-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wily diff output #65
Comments
Yikes! What version of Python is this and what version of Wily do you have installed? Please can you run |
Here see the conda environment file: and the index gives: -----------History------------ I also add some more output from the Using default metrics ['cyclomatic.complexity', 'maintainability.mi', 'raw.loc', 'halstead.h1'] |
I have a similar problem, but with almost every command (build command works): |
@GabdaZM are you also using anaconda? I think this is related to the default encoding profiles in the environment. |
No, I am using PyCharm on wndows, and using UTF-8 encoding, LF line ending. |
I am having the same issue when I tried using the pre-commit hook. Also using PyCharm on Windowns 10 with UTF-8 encoding and LF as line separator. Has there been any resolution or possible workaround for this issue? P.S. Manually typed in |
Seems to be the generic case for the issue I found in #182: the Windows terminal (or default file encoding) may not be able to handle all characters that we want to print/write. We should be able to encode and decode the output with an error handler. However, we'd first need to choose which error handler (or whether to make it configurable) to use. |
There's a different issue going on here: the It's possible to check The other issue, what happens when some data (like author names or commit messages) we want to print contain unprintable characters, should be solvable by using |
Avoid using unicode characters if `sys.stdout` doesn't support them (fix #65)
Hi,
I wanted to use wily as an external tool in Pycharm, in order to see the wily diff of a file.
wily.exe diff foobar.py
However this fails and I get this message:
... File "c:\programdata\anaconda3\envs\foobar\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-123: character maps to <undefined>
Same happens in the cmd when I wants to pipe the output to a file.
wily.exe diff foobar.py > wilydiff.txt
The output options are not valid for the diffs.
Any idea? Thanks
The text was updated successfully, but these errors were encountered: