You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a source file with exactly this content, for example orange.py:
import os
print('∅')
Run isort --overwrite-in-place --lai 2 orange.py.
Results in the file being emptied and the warning: ...isort\main.py:1214: UserWarning: Unable to parse file .\orange.py due to 'charmap' codec can't encode character '\u2205' in position 22: character maps to <undefined> sort_imports( # type: ignore.
What I expected
While I understand what the warning is about, I expect isort to not silently delete source code because of a simple encoding error.
The text was updated successfully, but these errors were encountered:
Version: 6.0.1
Interpreter: Python 3.11.2
OS: Windows 10 22H2 Build 19045.4894
Steps to reproduce
orange.py
:isort --overwrite-in-place --lai 2 orange.py
....isort\main.py:1214: UserWarning: Unable to parse file .\orange.py due to 'charmap' codec can't encode character '\u2205' in position 22: character maps to <undefined> sort_imports( # type: ignore
.What I expected
While I understand what the warning is about, I expect
isort
to not silently delete source code because of a simple encoding error.The text was updated successfully, but these errors were encountered: